From: Richard Biener Date: Tue, 21 Feb 2023 09:32:10 +0000 (+0100) Subject: tree-optimization/108868 - new testcase X-Git-Tag: basepoints/gcc-14~1054 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecc863e85efe259c799515de0c38c2297b0e3bd7;p=thirdparty%2Fgcc.git tree-optimization/108868 - new testcase New testcase for the fixed bug. PR tree-optimization/108868 * gcc.dg/pr108868.c: New testcase. --- diff --git a/gcc/testsuite/gcc.dg/pr108868.c b/gcc/testsuite/gcc.dg/pr108868.c new file mode 100644 index 000000000000..b6f1a79dedf1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr108868.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +int x; +int vfork (void) __attribute__((__leaf__, __returns_twice__)); +int fork (void); +void bar (int, int, int *); + +void +foo (void) +{ + int b = 0; + int r = x ? vfork () : fork (); + bar (r, x, &b); +} + +/* { dg-final { scan-tree-dump "ABNORMAL_DISPATCHER" "optimized" } } */