diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
237 files changed, 5773 insertions, 122 deletions
diff --git a/gcc/testsuite/gcc.dg/20050307-1.c b/gcc/testsuite/gcc.dg/20050307-1.c new file mode 100644 index 00000000000..0e8dac69a65 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050307-1.c @@ -0,0 +1,52 @@ +/* PR target/20322 */ + +extern void abort (void); + +typedef unsigned long T; +typedef struct +{ + T a, b; + unsigned char c, d; +} S; + +#define M (sizeof (T) * 4) + +S __attribute__((noinline)) +foo (T x, T y) +{ + S e; + T f[2], g; + + e.b = (x & (~(T) 0 >> M)) * (y & (~(T) 0 >> M)); + e.a = (x >> M) * (y >> M); + + f[0] = (x & (~(T) 0 >> M)) * (y >> M); + f[1] = (x >> M) * (y & (~(T) 0 >> M)); + + g = e.b; + e.b += (f[0] & (~(T) 0 >> M)) << M; + if (e.b < g) + e.a++; + + g = e.b; + e.b += (f[1] & (~(T) 0 >> M)) << M; + if (e.b < g) + e.a++; + + e.a += (f[0] >> M); + e.a += (f[1] >> M); + e.c = 1; + e.d = 0; + + return e; +} + +int +main (void) +{ + T x = 1UL << (M * 2 - 1); + S y = foo (1, x); + if (y.a || y.b != x || y.c != 1 || y.d) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/20050309-1.c b/gcc/testsuite/gcc.dg/20050309-1.c new file mode 100644 index 00000000000..413930f86f8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050309-1.c @@ -0,0 +1,37 @@ +/* This caused an ICE on s390 due to incorrect secondary + output reloads. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fprofile-generate" } */ + +char * +test(char *ret, int *counter, void *schema, + const char* name, const char *namespace, + void *node, int topLevel) +{ + char buf[30]; + int val; + + if (counter == 0) return 0; + if (schema == 0) return 0; + if (name == 0) return 0; + + __builtin_memset (ret, 0, 100); + lookup (schema, name, -1); + val = hash (schema, name, namespace, name, ret); + if (val == 0) return ret; + + if (topLevel != 0) + { + error (1, 0, 0, node, "%s", name); + return 0; + } + + __snprintf_chk (buf, 29, 1, 30, "#eCont %d", ++*counter); + val = hash (schema, name, buf, namespace, ret); + if (val == 0) return ret; + + error (1, 0, 0, node, "%s", name); + return 0; +} + diff --git a/gcc/testsuite/gcc.dg/20050321-1.c b/gcc/testsuite/gcc.dg/20050321-1.c new file mode 100644 index 00000000000..01c68cd5ed9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050321-1.c @@ -0,0 +1,26 @@ +/* This caused an ICE on powerpc-linux-gnu due to not + up-to-date life info (PR middle-end/20177). */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fmodulo-sched" } */ +extern void * malloc (long); + +struct s { + int k; +}; + +int n; +struct s *a1, *(*use)[]; +float (*vector)[]; + +void +foo (float *V) +{ + int i, used = 0; + + vector = malloc (i * sizeof (float)); + while ((*use)[used] != a1) + used += 1; + for (i = 0; i < n; i++) + *V += (*vector)[i]; +} diff --git a/gcc/testsuite/gcc.dg/20050321-2.c b/gcc/testsuite/gcc.dg/20050321-2.c new file mode 100644 index 00000000000..ac3191423b1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050321-2.c @@ -0,0 +1,54 @@ +/* This testcase could not assemble on ppc32, because the compiler assumed + the huge ADDR_DIFF_VEC will be emitted into rodata section, yet because + of some notes inserted between jump table's CODE_LABEL and the jump table + it ended up in the .text section and thus shorten_branches couldn't + figure out branch to lab is too far. */ +/* { dg-do link } */ +/* { dg-options "-g1 -fpic" } */ + +#define A(n) \ + case n##1: return n##1 * 131 + 63; \ + case n##3: return n##3 * 1231 + 182; \ + case n##5: return n##5 * 351 + 1; \ + case n##7: return n##7 * 312 + 61; \ + case n##9: return n##9 * 17 - 1; +#define B(n) \ +A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \ +A(n##5) A(n##6) A(n##7) A(n##8) A(n##9) +#define C(n) \ +B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \ +B(n##5) B(n##6) B(n##7) B(n##8) B(n##9) +#define D(n) \ +C(n##0) C(n##1) B(n##20) B(n##21) B(n##22) + +int +foo (int x) +{ + { +lab:; + int a = x; + while (a < 60000) + { + int b = a; + { + int c = b; + switch (c) + { + D(1) + default: break; + } + } + a += 10000; + if (a == 4168) + goto lab; + } + } + return x; +} + +int +main (void) +{ + foo (71); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/20050325-1.c b/gcc/testsuite/gcc.dg/20050325-1.c new file mode 100644 index 00000000000..5760e387a22 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050325-1.c @@ -0,0 +1,19 @@ +/* PR 20249 */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fprofile-arcs" } */ + +extern int *g (int x, void* y); +extern void fg (long long x, int y); + +static void +ff (int y, long long z) +{ + fg (z, 1); +} + +void +f () +{ + g (42, ff); +} diff --git a/gcc/testsuite/gcc.dg/20050330-1.c b/gcc/testsuite/gcc.dg/20050330-1.c new file mode 100644 index 00000000000..69b5f9dcfe9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20050330-1.c @@ -0,0 +1,14 @@ +/* This test is a reduced test case for a bug that caused + ICE while bootstrapping with -fmodulo-sched on powerpc-apple-darwin + related to (PR middle-end/20177). */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fmodulo-sched" } */ + +void +foo ( const char *bytes, int len , char *buf) +{ + int i; + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; +} diff --git a/gcc/testsuite/gcc.dg/Foundation.framework/empty b/gcc/testsuite/gcc.dg/Foundation.framework/empty new file mode 100644 index 00000000000..412078626a1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Foundation.framework/empty @@ -0,0 +1,2 @@ +/* APPLE LOCAL file mainline */ +This directory is empty. diff --git a/gcc/testsuite/gcc.dg/alias-3.c b/gcc/testsuite/gcc.dg/alias-3.c new file mode 100644 index 00000000000..3dc25a91c49 --- /dev/null +++ b/gcc/testsuite/gcc.dg/alias-3.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-require-alias "" } */ +/* { dg-options "" } */ + +extern int foo(); + +int baz () { return foo(); } + +static inline int bar () __attribute__ ((alias ("foo"))); /* { dg-error "aliased to" } */ + +int main () { return bar (); } diff --git a/gcc/testsuite/gcc.dg/alias-4.c b/gcc/testsuite/gcc.dg/alias-4.c new file mode 100644 index 00000000000..0a2633932ef --- /dev/null +++ b/gcc/testsuite/gcc.dg/alias-4.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-require-alias "" } */ +/* { dg-options "-O2 -funit-at-a-time" } */ + +extern int foo(); + +int baz () { return foo(); } + +static inline int bar () __attribute__ ((alias ("foo"))); /* { dg-error "aliased to" } */ + +int main () { return bar (); } diff --git a/gcc/testsuite/gcc.dg/alias-5.c b/gcc/testsuite/gcc.dg/alias-5.c new file mode 100644 index 00000000000..56848c9a416 --- /dev/null +++ b/gcc/testsuite/gcc.dg/alias-5.c @@ -0,0 +1,7 @@ +/* { dg-do link } */ +/* { dg-require-alias "" } */ +/* { dg-options "" } */ + +static inline int foo () { return 0; } +static int bar () __attribute__ ((alias ("foo"))); +int main () { return bar (); } diff --git a/gcc/testsuite/gcc.dg/alias-6.c b/gcc/testsuite/gcc.dg/alias-6.c new file mode 100644 index 00000000000..3ba101aa1b4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/alias-6.c @@ -0,0 +1,7 @@ +/* { dg-do link } */ +/* { dg-require-alias "" } */ +/* { dg-options "-O2 -funit-at-a-time" } */ + +static inline int foo () { return 0; } +static int bar () __attribute__ ((alias ("foo"))); +int main () { return bar (); } diff --git a/gcc/testsuite/gcc.dg/alias-7.c b/gcc/testsuite/gcc.dg/alias-7.c new file mode 100644 index 00000000000..697497021f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/alias-7.c @@ -0,0 +1,16 @@ +/* { dg-do run } */ +/* { dg-require-alias "" } */ +/* { dg-options "-O2" } */ + +extern void abort (void); + +int foo __asm__ ("foo") __attribute__((nocommon)); +extern __typeof (foo) bar __attribute__ ((weak, alias ("foo"))); + +int +main (void) +{ + if (&foo != &bar || foo || bar) + abort (); + return bar; +} diff --git a/gcc/testsuite/gcc.dg/altivec-20.c b/gcc/testsuite/gcc.dg/altivec-20.c new file mode 100644 index 00000000000..f733d18214c --- /dev/null +++ b/gcc/testsuite/gcc.dg/altivec-20.c @@ -0,0 +1,23 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-options "-maltivec -mcpu=G5 -O2" } */ + +#include <altivec.h> + +void foo( float scalar) +{ + unsigned long width; + unsigned long x; + vector float vColor; + vector unsigned int selectMask; + vColor = vec_perm( vec_ld( 0, &scalar), vec_ld( 3, &scalar), vec_lvsl( 0, &scalar) ); + + float *destRow; + vector float store, load0; + + for( ; x < width; x++) + { + load0 = vec_sel( vColor, load0, selectMask ); + vec_st( store, 0, destRow ); + store = load0; + } +} diff --git a/gcc/testsuite/gcc.dg/altivec-21.c b/gcc/testsuite/gcc.dg/altivec-21.c new file mode 100644 index 00000000000..bcb78ced52b --- /dev/null +++ b/gcc/testsuite/gcc.dg/altivec-21.c @@ -0,0 +1,16 @@ +/* APPLE LOCAL begin mainline 2005-04-14 */ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-xfail-if "" { "powerpc*-*-*" } { "-m64" } { "" } } */ +/* { dg-options "-maltivec" } */ + +#include <altivec.h> + +extern void preansi(); + +typedef void (*pvecfunc) (); + +void foo(pvecfunc pvf) { + vector int v = (vector int){1, 2, 3, 4}; + (*pvf) (4, 4.0, v); /* { dg-error "AltiVec argument passed to unprototyped function" } */ +} +/* APPLE LOCAL end mainline 2005-04-14 */ diff --git a/gcc/testsuite/gcc.dg/altivec-22.c b/gcc/testsuite/gcc.dg/altivec-22.c new file mode 100644 index 00000000000..51bcb4b4c69 --- /dev/null +++ b/gcc/testsuite/gcc.dg/altivec-22.c @@ -0,0 +1,16 @@ +/* APPLE LOCAL begin altivec test */ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-xfail-if "" { "powerpc*-*-*" } { "-m64" } { "" } } */ +/* { dg-options "-maltivec" } */ + +#include <altivec.h> + +extern void preansi(); + +typedef void (*pvecfunc) (); + +void foo(pvecfunc pvf) { + vector int v = (vector int){1, 2, 3, 4}; + preansi (4, 4.0, v); /* { dg-error "AltiVec argument passed to unprototyped function" } */ +} +/* APPLE LOCAL end altivec test */ diff --git a/gcc/testsuite/gcc.dg/anon-struct-6.c b/gcc/testsuite/gcc.dg/anon-struct-6.c index a2042176c03..ad961c62aea 100644 --- a/gcc/testsuite/gcc.dg/anon-struct-6.c +++ b/gcc/testsuite/gcc.dg/anon-struct-6.c @@ -9,4 +9,4 @@ struct s { const; }; /* { dg-warning "warning: useless type qualifier in empty declaration" "empty" { target *-*-* } 9 } */ -/* { dg-warning "warning: empty declaration" "empty" { target *-*-* } 9 } */ +/* { dg-warning "warning: empty declaration" "empty 2" { target *-*-* } 9 } */ diff --git a/gcc/testsuite/gcc.dg/array-8.c b/gcc/testsuite/gcc.dg/array-8.c index 6d0a211461b..44b757b70df 100644 --- a/gcc/testsuite/gcc.dg/array-8.c +++ b/gcc/testsuite/gcc.dg/array-8.c @@ -43,7 +43,7 @@ g (void) pv[0]; /* { dg-warning "warning: dereferencing 'void \\*' pointer" } */ 0[pv]; /* { dg-warning "warning: dereferencing 'void \\*' pointer" } */ sip[0]; /* { dg-error "error: invalid use of undefined type 'struct si'" } */ - /* { dg-error "error: dereferencing pointer to incomplete type" "" { target *-*-* } 45 } */ + /* { dg-error "error: dereferencing pointer to incomplete type" "incomplete" { target *-*-* } 45 } */ 0[sip]; /* { dg-error "error: invalid use of undefined type 'struct si'" } */ - /* { dg-error "error: dereferencing pointer to incomplete type" "" { target *-*-* } 47 } */ + /* { dg-error "error: dereferencing pointer to incomplete type" "incomplete" { target *-*-* } 47 } */ } diff --git a/gcc/testsuite/gcc.dg/asm-b.c b/gcc/testsuite/gcc.dg/asm-b.c new file mode 100644 index 00000000000..ce68cabe300 --- /dev/null +++ b/gcc/testsuite/gcc.dg/asm-b.c @@ -0,0 +1,39 @@ +/* { dg-do run { target powerpc-*-* i?386-*-* x86_64-*-* } } */ +/* { dg-options "-O1" } */ +/* Test to make sure that inline-asm causes the tree optimizators get the + V_MAY_DEFs and clober memory. */ +/* Test from Jakub Jelinek, modified by Andrew Pinski to work on all powerpc targets. */ +extern void abort (void); + +unsigned short v = 0x0300; + +void +foo (unsigned short *p) +{ + *p = v; +} + +int +bar (void) +{ + unsigned short x; + volatile unsigned short *z; + foo (&x); + const unsigned int y = x; + z = &x; +#if defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) || defined (_POWER) + __asm __volatile ("sthbrx %1,0,%2" : "=m" (*z) : "r" (y), "r" (z)); +#elif defined __i386__ || defined __x86_64__ + __asm __volatile ("movb %b1,1(%2); movb %h1,(%2)" : "=m" (*z) : "r" (y), "r" +(z)); +#endif + return (x & 1) == 0; +} + +int +main (void) +{ + if (bar ()) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/bitfld-14.c b/gcc/testsuite/gcc.dg/bitfld-14.c new file mode 100644 index 00000000000..eca0b03def0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/bitfld-14.c @@ -0,0 +1,11 @@ +/* Test for non-integer bit-field widths. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +enum e { E, F }; +struct s { + int a : (void *)4; /* { dg-error "error: bit-field 'a' width not an integer constant" } */ + int b : (enum e)F; + int c : (_Bool)1; +}; diff --git a/gcc/testsuite/gcc.dg/builtin-apply4.c b/gcc/testsuite/gcc.dg/builtin-apply4.c new file mode 100644 index 00000000000..289694e3c1b --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtin-apply4.c @@ -0,0 +1,30 @@ +/* PR tree-optimization/20076 */ +/* { dg-options "-O2" } */ +/* { dg-do run } */ + +extern void abort (void); + +double +foo (int arg) +{ + if (arg != 116) + abort(); + return arg + 1; +} + +inline double +bar (int arg) +{ + foo (arg); + __builtin_return (__builtin_apply ((void (*) ()) foo, + __builtin_apply_args (), 16)); +} + +int +main (int argc, char **argv) +{ + if (bar (116) != 117.0) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-1.c b/gcc/testsuite/gcc.dg/c99-tgmath-1.c new file mode 100644 index 00000000000..e4890226511 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-tgmath-1.c @@ -0,0 +1,248 @@ +/* APPLE LOCAL file radar 2872232 */ +/* Test for <tgmath.h> in C99. */ +/* Origin: Matt Austern <austern@apple.com> +/* { dg-do preprocess } */ +/* { dg-options "-std=iso9899:1999" } */ + +/* Test that tgmath defines the macros it's supposed to. */ +#include <tgmath.h> + +#ifndef acos +#error acos undefined +#endif + +#ifndef asin +#error asin undefined +#endif + +#ifndef atan +#error atan undefined +#endif + +#ifndef acosh +#error acosh undefined +#endif + +#ifndef asinh +#error asinh undefined +#endif + +#ifndef atanh +#error atanh undefined +#endif + +#ifndef cos +#error cos undefined +#endif + +#ifndef sin +#error sin undefined +#endif + +#ifndef tan +#error tan undefined +#endif + +#ifndef cosh +#error cosh undefined +#endif + +#ifndef sinh +#error sinh undefined +#endif + +#ifndef tanh +#error tanh undefined +#endif + +#ifndef exp +#error exp undefined +#endif + +#ifndef log +#error log undefined +#endif + +#ifndef pow +#error pow undefined +#endif + +#ifndef sqrt +#error sqrt undefined +#endif + +#ifndef fabs +#error fabs undefined +#endif + +#ifndef atan2 +#error atan2 undefined +#endif + +#ifndef cbrt +#error cbrt undefined +#endif + +#ifndef ceil +#error ceil undefined +#endif + +#ifndef copysign +#error copysign undefined +#endif + +#ifndef erf +#error erf undefined +#endif + +#ifndef erfc +#error erfc undefined +#endif + +#ifndef exp2 +#error exp2 undefined +#endif + +#ifndef expm1 +#error expm1 undefined +#endif + +#ifndef fdim +#error fdim undefined +#endif + +#ifndef floor +#error floor undefined +#endif + +#ifndef fma +#error fma undefined +#endif + +#ifndef fmax +#error fmax undefined +#endif + +#ifndef fmin +#error fmin undefined +#endif + +#ifndef fmod +#error fmod undefined +#endif + +#ifndef frexp +#error frexp undefined +#endif + +#ifndef hypot +#error hypot undefined +#endif + +#ifndef ilogb +#error ilogb undefined +#endif + +#ifndef ldexp +#error ldexp undefined +#endif + +#ifndef lgamma +#error lgamma undefined +#endif + +#ifndef llrint +#error llrint undefined +#endif + +#ifndef llround +#error llround undefined +#endif + +#ifndef log10 +#error log10 undefined +#endif + +#ifndef log1p +#error log1p undefined +#endif + +#ifndef log2 +#error log2 undefined +#endif + +#ifndef logb +#error logb undefined +#endif + +#ifndef lrint +#error lrint undefined +#endif + +#ifndef lround +#error lround undefined +#endif + +#ifndef nearbyint +#error nearbyint undefined +#endif + +#ifndef nextafter +#error nextafter undefined +#endif + +#ifndef nexttoward +#error nexttoward undefined +#endif + +#ifndef remainder +#error remainder undefined +#endif + +#ifndef remquo +#error remquo undefined +#endif + +#ifndef rint +#error rint undefined +#endif + +#ifndef round +#error round undefined +#endif + +#ifndef scalbn +#error scalbn undefined +#endif + +#ifndef scalbln +#error scalbln undefined +#endif + +#ifndef tgamma +#error tgamma undefined +#endif + +#ifndef trunc +#error trunc undefined +#endif + +#ifndef carg +#error carg undefined +#endif + +#ifndef cimag +#error cimag undefined +#endif + +#ifndef conj +#error conj undefined +#endif + +#ifndef cproj +#error cproj undefined +#endif + +#ifndef creal +#error creal undefined +#endif diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-2.c b/gcc/testsuite/gcc.dg/c99-tgmath-2.c new file mode 100644 index 00000000000..35978cc8469 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-tgmath-2.c @@ -0,0 +1,15 @@ +/* APPLE LOCAL file radar 2872232 */ +/* Test for <tgmath.h> in C99. */ +/* Origin: Matt Austern <austern@apple.com> +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999" } */ + +/* Test that invoking type-generic sin on a float invokes sinf. */ +#include <tgmath.h> + +float foo(float x) +{ + return sin(x); +} + +/* {dg-final {scan-assembler "sinf" } } */ diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-3.c b/gcc/testsuite/gcc.dg/c99-tgmath-3.c new file mode 100644 index 00000000000..9d164095a70 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-tgmath-3.c @@ -0,0 +1,15 @@ +/* APPLE LOCAL file radar 2872232 */ +/* Test for <tgmath.h> in C99. */ +/* Origin: Matt Austern <austern@apple.com> +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999" } */ + +/* Test that invoking type-generic exp on a complex invokes cexp. */ +#include <tgmath.h> + +complex double foo(complex double x) +{ + return exp(x); +} + +/* {dg-final {scan-assembler "cexp" } } */ diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-4.c b/gcc/testsuite/gcc.dg/c99-tgmath-4.c new file mode 100644 index 00000000000..dbb8d1c341c --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-tgmath-4.c @@ -0,0 +1,15 @@ +/* APPLE LOCAL file radar 2872232 */ +/* Test for <tgmath.h> in C99. */ +/* Origin: Matt Austern <austern@apple.com> +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999" } */ + +/* Test that invoking type-generic pow on complex float invokes cpowf. */ +#include <tgmath.h> + +complex double foo(complex float x, float y) +{ + return pow(x, y); +} + +/* {dg-final {scan-assembler "cpowf" } } */ diff --git a/gcc/testsuite/gcc.dg/cast-lvalue-2.c b/gcc/testsuite/gcc.dg/cast-lvalue-2.c index ed6a2e69fe8..0d52a6253c7 100644 --- a/gcc/testsuite/gcc.dg/cast-lvalue-2.c +++ b/gcc/testsuite/gcc.dg/cast-lvalue-2.c @@ -1,7 +1,8 @@ /* Test for error on casts as lvalues. Casts to same type. */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* APPLE LOCAL non lvalue assign */ +/* { dg-options "-fno-non-lvalue-assign" } */ int x; @@ -10,4 +11,5 @@ foo (void) { (int) x = 1; /* { dg-bogus "warning" "warning in place of error" } */ } -/* { dg-error "lvalue" "cast as lvalue" { target *-*-*} 11 } */ +/* APPLE LOCAL non lvalue assign */ +/* { dg-error "lvalue" "cast as lvalue" { target *-*-*} 12 } */ diff --git a/gcc/testsuite/gcc.dg/cast-ptr-1.c b/gcc/testsuite/gcc.dg/cast-ptr-1.c new file mode 100644 index 00000000000..cb42d13ac48 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cast-ptr-1.c @@ -0,0 +1,15 @@ +/* APPLE LOCAL file pointer casts */ +/* Test that casts of pointer to unsigned long long aren't sign extended */ +/* Author: Matt Austern <austern@apple.com> */ +/* { dg-do run } */ +/* { dg-options "-Wno-error -w" } */ + +int main () { + /* Note: test assumes sizeof(long long) >= sizeof(void*) */ + + unsigned long x1 = 0x80000000ul; + void* p = (void*) x1; + unsigned long long x2 = (unsigned long long) p; + + return !(x1 == x2); +} diff --git a/gcc/testsuite/gcc.dg/charset/asm1.c b/gcc/testsuite/gcc.dg/charset/asm1.c index d7578d418f6..dfd14018613 100644 --- a/gcc/testsuite/gcc.dg/charset/asm1.c +++ b/gcc/testsuite/gcc.dg/charset/asm1.c @@ -1,5 +1,5 @@ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler ".ascii bar" } } { dg-final { scan-assembler ".ascii foo" } } */ diff --git a/gcc/testsuite/gcc.dg/charset/asm2.c b/gcc/testsuite/gcc.dg/charset/asm2.c index bfca86c8e96..a9a9c011b2b 100644 --- a/gcc/testsuite/gcc.dg/charset/asm2.c +++ b/gcc/testsuite/gcc.dg/charset/asm2.c @@ -2,7 +2,7 @@ If we ever get a good way to test error recovery the string "foobar" should be translated. */ /* { dg-do compile } */ -/* { dg-require-iconv "IBM-1047" } */ +/* { dg-require-iconv "IBM1047" } */ asm (not_a_string); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */ char x[] = "foobar"; diff --git a/gcc/testsuite/gcc.dg/charset/asm3.c b/gcc/testsuite/gcc.dg/charset/asm3.c index 8d8dbbb524d..8ae2212fd26 100644 --- a/gcc/testsuite/gcc.dg/charset/asm3.c +++ b/gcc/testsuite/gcc.dg/charset/asm3.c @@ -1,7 +1,7 @@ /* Test for complex asm statements. Make sure it compiles then test for some of the asm statements not being translated. */ /* { dg-do compile { target i?86-*-* } } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler "std" } } { dg-final { scan-assembler "cld" } } { dg-final { scan-assembler "rep" } } diff --git a/gcc/testsuite/gcc.dg/charset/asm4.c b/gcc/testsuite/gcc.dg/charset/asm4.c index cd850c3e81f..59c8d59ff39 100644 --- a/gcc/testsuite/gcc.dg/charset/asm4.c +++ b/gcc/testsuite/gcc.dg/charset/asm4.c @@ -1,6 +1,6 @@ /* Simple asm test. */ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler "foo" } } */ extern int bar; diff --git a/gcc/testsuite/gcc.dg/charset/asm5.c b/gcc/testsuite/gcc.dg/charset/asm5.c index fa93f40fdaf..a4bb01401a9 100644 --- a/gcc/testsuite/gcc.dg/charset/asm5.c +++ b/gcc/testsuite/gcc.dg/charset/asm5.c @@ -1,6 +1,6 @@ /* Test for string translation. */ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler-not "translate" } } */ void foo (void) { diff --git a/gcc/testsuite/gcc.dg/charset/asm6.c b/gcc/testsuite/gcc.dg/charset/asm6.c index 91316224f0c..ae2ec485d80 100644 --- a/gcc/testsuite/gcc.dg/charset/asm6.c +++ b/gcc/testsuite/gcc.dg/charset/asm6.c @@ -1,6 +1,6 @@ /* Test for string translation. */ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler "foo" } } */ int main() { diff --git a/gcc/testsuite/gcc.dg/charset/attribute1.c b/gcc/testsuite/gcc.dg/charset/attribute1.c index 993c7934c80..799630030ba 100644 --- a/gcc/testsuite/gcc.dg/charset/attribute1.c +++ b/gcc/testsuite/gcc.dg/charset/attribute1.c @@ -1,6 +1,6 @@ /* Test for attribute non-translation. */ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler "foo" } } */ int walrus __attribute__ ((section (".foo"))); diff --git a/gcc/testsuite/gcc.dg/charset/attribute2.c b/gcc/testsuite/gcc.dg/charset/attribute2.c index 4ce95a51f84..ef1f35f3ed1 100644 --- a/gcc/testsuite/gcc.dg/charset/attribute2.c +++ b/gcc/testsuite/gcc.dg/charset/attribute2.c @@ -2,7 +2,7 @@ If error recovery is ever testable then "foobar" should be translated. */ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } */ int foo __attribute__ ((walrus)); /* { dg-error "walrus" "ignored" } */ char x[] = "foobar"; diff --git a/gcc/testsuite/gcc.dg/charset/builtin1.c b/gcc/testsuite/gcc.dg/charset/builtin1.c new file mode 100644 index 00000000000..753049c9666 --- /dev/null +++ b/gcc/testsuite/gcc.dg/charset/builtin1.c @@ -0,0 +1,26 @@ +/* isdigit(c) can be optimized to ((unsigned)c) - '0' <= 9, but only if + we know the correct value of '0'. PR 18785. */ + +/* { dg-do run } */ +/* { dg-require-iconv "IBM1047" } */ +/* { dg-options "-O2 -fno-inline -fexec-charset=IBM1047" } */ + +extern int isdigit(int); +extern void abort(void); + +static int str1(void) { return '1'; } +static int strA(void) { return 'A'; } + +int +main(void) +{ + if (!isdigit('1')) + abort(); + if (isdigit('A')) + abort(); + if (!isdigit(str1())) + abort(); + if (isdigit(strA())) + abort(); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/charset/charset.exp b/gcc/testsuite/gcc.dg/charset/charset.exp index ad75cb55af8..bc2c65db910 100644 --- a/gcc/testsuite/gcc.dg/charset/charset.exp +++ b/gcc/testsuite/gcc.dg/charset/charset.exp @@ -30,7 +30,7 @@ load_lib target-supports.exp # If a testcase doesn't have special options, use these. global DEFAULT_CHARSETCFLAGS if ![info exists DEFAULT_CHARSETCFLAGS] then { - set DEFAULT_CHARSETCFLAGS "-fexec-charset=IBM-1047" + set DEFAULT_CHARSETCFLAGS "-fexec-charset=IBM1047" } # Initialize `dg'. diff --git a/gcc/testsuite/gcc.dg/charset/extern.c b/gcc/testsuite/gcc.dg/charset/extern.c index 5e46ca6facf..05a0c3e42bc 100644 --- a/gcc/testsuite/gcc.dg/charset/extern.c +++ b/gcc/testsuite/gcc.dg/charset/extern.c @@ -1,5 +1,5 @@ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler-not "abcdefghijklmnopqrstuvwxyz" } } */ extern char *bar; diff --git a/gcc/testsuite/gcc.dg/charset/function.c b/gcc/testsuite/gcc.dg/charset/function.c index ab4c2bcba0e..5aba6511bd0 100644 --- a/gcc/testsuite/gcc.dg/charset/function.c +++ b/gcc/testsuite/gcc.dg/charset/function.c @@ -1,5 +1,5 @@ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler-not "\"foobar\"" } } */ const char *str; diff --git a/gcc/testsuite/gcc.dg/charset/string.c b/gcc/testsuite/gcc.dg/charset/string.c index 375e28a2ed6..f720773dd57 100644 --- a/gcc/testsuite/gcc.dg/charset/string.c +++ b/gcc/testsuite/gcc.dg/charset/string.c @@ -1,5 +1,5 @@ /* Simple character translation test. */ /* { dg-do compile } - { dg-require-iconv "IBM-1047" } + { dg-require-iconv "IBM1047" } { dg-final { scan-assembler-not "string foobar" } } */ char *foo = "string foobar"; diff --git a/gcc/testsuite/gcc.dg/cond-lvalue-1.c b/gcc/testsuite/gcc.dg/cond-lvalue-1.c index f2605af6ad6..8c7595bd591 100644 --- a/gcc/testsuite/gcc.dg/cond-lvalue-1.c +++ b/gcc/testsuite/gcc.dg/cond-lvalue-1.c @@ -1,7 +1,8 @@ /* Test for deprecation of conditional expressions as lvalues. */ /* Origin: Joseph Myers <jsm@polyomino.org.uk> */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* APPLE LOCAL non lvalue assign */ +/* { dg-options "-fno-non-lvalue-assign" } */ int x, y, z; @@ -10,4 +11,5 @@ foo (void) { (x ? y : z) = 1; /* { dg-bogus "warning" "warning in place of error" } */ } -/* { dg-error "lvalue" "conditional expression as lvalue" { target *-*-* } 11 } */ +/* APPLE LOCAL non lvalue assign */ +/* { dg-error "lvalue" "conditional expression as lvalue" { target *-*-* } 12 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/19940712-1.c b/gcc/testsuite/gcc.dg/cpp/19940712-1.c index 5b4ac8b722c..d5ed88973e3 100644 --- a/gcc/testsuite/gcc.dg/cpp/19940712-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19940712-1.c @@ -3,7 +3,7 @@ /* dg.exp doesn't read the header files for magic comments. */ /* { dg-error "unterminated comment" "" { target *-*-* } 4 } */ -/* { dg-error "unterminated comment" "" { target *-*-* } 8 } */ +/* { dg-error "unterminated comment" "header error" { target *-*-* } 8 } */ #include "19940712-1.h" /* { dg-error "" } // In file included from: */ #include "19940712-1a.h" /* { dg-error "" } // In file included from: */ diff --git a/gcc/testsuite/gcc.dg/cpp/19951025-1.c b/gcc/testsuite/gcc.dg/cpp/19951025-1.c index 283b5f53f1a..b817b68c8ae 100644 --- a/gcc/testsuite/gcc.dg/cpp/19951025-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19951025-1.c @@ -1,4 +1,4 @@ /* { dg-do preprocess } */ -/* { dg-error "include expects" "" { target *-*-* } 4 } */ -/* { dg-error "newline at end" "" { target *-*-* } 4 } */ +/* { dg-error "include expects" "include" { target *-*-* } 4 } */ +/* { dg-error "newline at end" "newline" { target *-*-* } 4 } */ #include /\ diff --git a/gcc/testsuite/gcc.dg/cpp/assert4.c b/gcc/testsuite/gcc.dg/cpp/assert4.c index 99b304f2455..023bb50cdeb 100644 --- a/gcc/testsuite/gcc.dg/cpp/assert4.c +++ b/gcc/testsuite/gcc.dg/cpp/assert4.c @@ -78,7 +78,7 @@ # error #endif -#if defined __unix__ || defined _AIX +#if ( defined __unix__ && !defined __CYGWIN__ ) || defined _AIX # if !#system(unix) # error # endif @@ -118,7 +118,7 @@ # error #endif -#if defined __WINNT__ +#if defined __WINNT__ || defined __CYGWIN__ # if !#system(winnt) # error # endif diff --git a/gcc/testsuite/gcc.dg/cpp/c++98-pedantic.cc b/gcc/testsuite/gcc.dg/cpp/c++98-pedantic.cc new file mode 100644 index 00000000000..1e8c160a96f --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/c++98-pedantic.cc @@ -0,0 +1,11 @@ +/* APPLE LOCAL file rename for HFS */ +/* Copyright (C) 2000 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c++98 -pedantic" } */ + +/* This file is for testing the preprocessor in -std=c++98 -pedantic mode. + Neil Booth, 2 Dec 2000. */ + +#if 1LL /* { dg-warning "long long" } */ +#endif diff --git a/gcc/testsuite/gcc.dg/cpp/c++98.cc b/gcc/testsuite/gcc.dg/cpp/c++98.cc new file mode 100644 index 00000000000..a9843b878fd --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/c++98.cc @@ -0,0 +1,11 @@ +/* APPLE LOCAL file rename for HFS */ +/* Copyright (C) 2000 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ +/* { dg-options "-std=c++98" } */ + +/* This file is for testing the preprocessor in -std=c++98 mode. + Neil Booth, 2 Dec 2000. */ + +#if 1LL +#endif diff --git a/gcc/testsuite/gcc.dg/cpp/cpp.exp b/gcc/testsuite/gcc.dg/cpp/cpp.exp index 960a29182d0..d1ed5e8c981 100644 --- a/gcc/testsuite/gcc.dg/cpp/cpp.exp +++ b/gcc/testsuite/gcc.dg/cpp/cpp.exp @@ -23,6 +23,13 @@ if [is_remote host] { } } +# APPLE LOCAL begin headermaps +file mkdir d +foreach header { A.h bA.h c.h d/d.h } { + remote_download host $srcdir/$subdir/inc/$header $header +} +# APPLE LOCAL end headermaps + # Load support procs. load_lib gcc-dg.exp diff --git a/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c b/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c index d5c6eb960e6..0b2124bd512 100644 --- a/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c +++ b/gcc/testsuite/gcc.dg/cpp/endif-pedantic2.c @@ -3,6 +3,8 @@ /* { dg-do preprocess } */ /* { dg-options "-Wno-endif-labels -pedantic" } */ +/* APPLE LOCAL -Wextra-tokens */ +/* { dg-options "-Wextra-tokens -Wno-endif-labels -pedantic" { target *-apple-darwin* } } */ /* Tests combinations of -pedantic and -Wno-endif-labels; see extratokens2.c for more general tests. */ diff --git a/gcc/testsuite/gcc.dg/cpp/extratokens.c b/gcc/testsuite/gcc.dg/cpp/extratokens.c index c06a41d4c2b..125a9bdf805 100644 --- a/gcc/testsuite/gcc.dg/cpp/extratokens.c +++ b/gcc/testsuite/gcc.dg/cpp/extratokens.c @@ -1,7 +1,8 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. */ /* { dg-do preprocess } */ -/* { dg-options "-fno-show-column" } */ +/* APPLE LOCAL -Wextra-tokens */ +/* { dg-options "-fno-show-column -Wextra-tokens" } */ /* Tests all directives that do not permit excess tokens at the end of the line. */ diff --git a/gcc/testsuite/gcc.dg/cpp/headermap-1.c b/gcc/testsuite/gcc.dg/cpp/headermap-1.c new file mode 100644 index 00000000000..aac0257df63 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/headermap-1.c @@ -0,0 +1,18 @@ +/* APPLE LOCAL file headermaps */ +/* Copyright (C) 2005 Free Software Foundation, Inc. */ + +/* { dg-do compile { target powerpc*-*-darwin* } } */ +/* This test is ppc specific, as the headermap binary was generated for ppc. */ +/* { dg-options "-I $srcdir/gcc.dg/cpp/headermap.hmap" } */ + +#define COUNT 1 +#include <A.h> +#include <bA.h> +#include <c.h> +#import <d.h> +#import <d.h> +#import <A.h> + +#if COUNT != 5 + #error COUNT not 5 in headermap-1 +#endif diff --git a/gcc/testsuite/gcc.dg/cpp/headermap-2.c b/gcc/testsuite/gcc.dg/cpp/headermap-2.c new file mode 100644 index 00000000000..68e4690c475 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/headermap-2.c @@ -0,0 +1,16 @@ +/* APPLE LOCAL file headermaps */ +/* Copyright (C) 2005 Free Software Foundation, Inc. */ + +/* { dg-do compile { target powerpc*-*-darwin* } } */ +/* This test is ppc specific, as the headermap binary was generated for ppc. */ +/* { dg-options "-I $srcdir/gcc.dg/cpp/headermap.hmap" } */ + +#define COUNT 1 +#include <a.h> /* { dg-warning "mismatched case" } */ +#include <Ba.h> /* { dg-warning "mismatched case" } */ +#include <C.h> /* { dg-warning "mismatched case" } */ +#import <c.h> + +#if COUNT != 4 + #error COUNT not 4 in headermap-d21 +#endif diff --git a/gcc/testsuite/gcc.dg/cpp/headermap.hmap b/gcc/testsuite/gcc.dg/cpp/headermap.hmap Binary files differnew file mode 100644 index 00000000000..f9b70b5cce5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/headermap.hmap diff --git a/gcc/testsuite/gcc.dg/cpp/if-2.c b/gcc/testsuite/gcc.dg/cpp/if-2.c index 8bca251b46b..8237112078d 100644 --- a/gcc/testsuite/gcc.dg/cpp/if-2.c +++ b/gcc/testsuite/gcc.dg/cpp/if-2.c @@ -1,5 +1,7 @@ /* { dg-do preprocess } */ /* { dg-options -pedantic-errors } */ +/* APPLE LOCAL -Wfour-char-constants */ +/* { dg-options "-Wfour-char-constants" { target *-apple-darwin* } } */ #if 'a' != 'a' || '\001' != 1 || '\x12' != 0x12 #error a,1,0x12 /* { dg-bogus "#error" "basic charconst recognition" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/inc/A.h b/gcc/testsuite/gcc.dg/cpp/inc/A.h new file mode 100644 index 00000000000..a1a6ef851c3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/inc/A.h @@ -0,0 +1,6 @@ +/* APPLE LOCAL file headermaps */ +#if COUNT != 1 + #error COUNT not 1 +#endif +#undef COUNT +#define COUNT 2 diff --git a/gcc/testsuite/gcc.dg/cpp/inc/bA.h b/gcc/testsuite/gcc.dg/cpp/inc/bA.h new file mode 100644 index 00000000000..4ba328017bf --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/inc/bA.h @@ -0,0 +1,6 @@ +/* APPLE LOCAL file headermaps */ +#if COUNT != 2 + #error COUNT not 2 in bA +#endif +#undef COUNT +#define COUNT 3 diff --git a/gcc/testsuite/gcc.dg/cpp/inc/c.h b/gcc/testsuite/gcc.dg/cpp/inc/c.h new file mode 100644 index 00000000000..48a738aa7cd --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/inc/c.h @@ -0,0 +1,6 @@ +/* APPLE LOCAL file headermaps */ +#if COUNT != 3 + #error COUNT not 3 in c +#endif +#undef COUNT +#define COUNT 4 diff --git a/gcc/testsuite/gcc.dg/cpp/inc/d/d.h b/gcc/testsuite/gcc.dg/cpp/inc/d/d.h new file mode 100644 index 00000000000..29173816d0a --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/inc/d/d.h @@ -0,0 +1,7 @@ +/* APPLE LOCAL file headermaps */ +#if COUNT != 4 + #error COUNT not 4 in d +#endif +#undef COUNT +#define COUNT 5 + diff --git a/gcc/testsuite/gcc.dg/cpp/include2.c b/gcc/testsuite/gcc.dg/cpp/include2.c index 60edfccb0cd..f4f6ab41f9d 100644 --- a/gcc/testsuite/gcc.dg/cpp/include2.c +++ b/gcc/testsuite/gcc.dg/cpp/include2.c @@ -1,10 +1,10 @@ /* Copyright (C) 2000 Free Software Foundation, Inc. */ /* { dg-do preprocess } */ - +/* APPLE LOCAL begin -Wextra-tokens */ /* Tests that #include does not allow the terminating '>' or '"' to be escaped, as per the standard. */ - +/* { dg-options "-Wextra-tokens" } */ /* Source: Neil Booth, 4 Nov 2000. */ #include <silly\>> /* { dg-warning "extra tokens" "" } */ @@ -13,4 +13,4 @@ /* These error is No such file or directory, just once. However, this message is locale-dependent, so don't test for it. */ /* { dg-error "silly" "" { target *-*-* } 10 } */ - +/* APPLE LOCAL end */ diff --git a/gcc/testsuite/gcc.dg/cpp/mac-eol-at-eof.c b/gcc/testsuite/gcc.dg/cpp/mac-eol-at-eof.c new file mode 100644 index 00000000000..e3dca859b32 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/mac-eol-at-eof.c @@ -0,0 +1 @@ +/* APPLE LOCAL file mainline 2005-03-04 */
/* Test no newline at eof warning when Mac line ending is used*/
/* { dg-do compile } */
int main() { return 0; }
\ No newline at end of file diff --git a/gcc/testsuite/gcc.dg/cpp/macspace1.c b/gcc/testsuite/gcc.dg/cpp/macspace1.c new file mode 100644 index 00000000000..ddd62c743b9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/macspace1.c @@ -0,0 +1,61 @@ +/* PR preprocessor/19475 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=iso9899:1990 -pedantic-errors -fno-show-column" } */ + +#define a! /* { dg-warning "missing whitespace" } */ +#define b" /* { dg-warning "missing whitespace" } */ +#define c# /* { dg-warning "missing whitespace" } */ +#define d% /* { dg-warning "missing whitespace" } */ +#define e& /* { dg-warning "missing whitespace" } */ +#define f' /* { dg-warning "missing whitespace" } */ +#define g) /* { dg-warning "missing whitespace" } */ +#define h* /* { dg-warning "missing whitespace" } */ +#define i+ /* { dg-warning "missing whitespace" } */ +#define j, /* { dg-warning "missing whitespace" } */ +#define k- /* { dg-warning "missing whitespace" } */ +#define l. /* { dg-warning "missing whitespace" } */ +#define m/ /* { dg-warning "missing whitespace" } */ +#define n: /* { dg-warning "missing whitespace" } */ +#define o; /* { dg-warning "missing whitespace" } */ +#define p< /* { dg-warning "missing whitespace" } */ +#define q= /* { dg-warning "missing whitespace" } */ +#define r> /* { dg-warning "missing whitespace" } */ +#define s? /* { dg-warning "missing whitespace" } */ +#define t[ /* { dg-warning "missing whitespace" } */ +#define u] /* { dg-warning "missing whitespace" } */ +#define v^ /* { dg-warning "missing whitespace" } */ +#define w{ /* { dg-warning "missing whitespace" } */ +#define x| /* { dg-warning "missing whitespace" } */ +#define y} /* { dg-warning "missing whitespace" } */ +#define z~ /* { dg-warning "missing whitespace" } */ +#define A>> /* { dg-warning "missing whitespace" } */ +#define B<< /* { dg-warning "missing whitespace" } */ +#define E&& /* { dg-warning "missing whitespace" } */ +#define F|| /* { dg-warning "missing whitespace" } */ +#define G== /* { dg-warning "missing whitespace" } */ +#define H!= /* { dg-warning "missing whitespace" } */ +#define I>= /* { dg-warning "missing whitespace" } */ +#define J<= /* { dg-warning "missing whitespace" } */ +#define K+= /* { dg-warning "missing whitespace" } */ +#define L-= /* { dg-warning "missing whitespace" } */ +#define M*= /* { dg-warning "missing whitespace" } */ +#define N/= /* { dg-warning "missing whitespace" } */ +#define O%= /* { dg-warning "missing whitespace" } */ +#define P&= /* { dg-warning "missing whitespace" } */ +#define Q|= /* { dg-warning "missing whitespace" } */ +#define R^= /* { dg-warning "missing whitespace" } */ +#define S>>= /* { dg-warning "missing whitespace" } */ +#define T<<= /* { dg-warning "missing whitespace" } */ +#define W... /* { dg-warning "missing whitespace" } */ +#define X++ /* { dg-warning "missing whitespace" } */ +#define Y-- /* { dg-warning "missing whitespace" } */ +#define Z-> /* { dg-warning "missing whitespace" } */ +#define aa:: /* { dg-warning "missing whitespace" } */ +#define ab->* /* { dg-warning "missing whitespace" } */ +#define ac.* /* { dg-warning "missing whitespace" } */ +#define ad\x /* { dg-warning "missing whitespace" } */ +#define ae\\x /* { dg-warning "missing whitespace" } */ +#define af'1' /* { dg-warning "missing whitespace" } */ +#define ag"abc" /* { dg-warning "missing whitespace" } */ + +int dummy; diff --git a/gcc/testsuite/gcc.dg/cpp/macspace2.c b/gcc/testsuite/gcc.dg/cpp/macspace2.c new file mode 100644 index 00000000000..21576fa22fa --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/macspace2.c @@ -0,0 +1,61 @@ +/* PR preprocessor/19475 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=iso9899:1999 -pedantic-errors -fno-show-column" } */ + +#define a! /* { dg-error "requires whitespace" } */ +#define b" /* { dg-error "requires whitespace" } */ +#define c# /* { dg-error "requires whitespace" } */ +#define d% /* { dg-error "requires whitespace" } */ +#define e& /* { dg-error "requires whitespace" } */ +#define f' /* { dg-error "requires whitespace" } */ +#define g) /* { dg-error "requires whitespace" } */ +#define h* /* { dg-error "requires whitespace" } */ +#define i+ /* { dg-error "requires whitespace" } */ +#define j, /* { dg-error "requires whitespace" } */ +#define k- /* { dg-error "requires whitespace" } */ +#define l. /* { dg-error "requires whitespace" } */ +#define m/ /* { dg-error "requires whitespace" } */ +#define n: /* { dg-error "requires whitespace" } */ +#define o; /* { dg-error "requires whitespace" } */ +#define p< /* { dg-error "requires whitespace" } */ +#define q= /* { dg-error "requires whitespace" } */ +#define r> /* { dg-error "requires whitespace" } */ +#define s? /* { dg-error "requires whitespace" } */ +#define t[ /* { dg-error "requires whitespace" } */ +#define u] /* { dg-error "requires whitespace" } */ +#define v^ /* { dg-error "requires whitespace" } */ +#define w{ /* { dg-error "requires whitespace" } */ +#define x| /* { dg-error "requires whitespace" } */ +#define y} /* { dg-error "requires whitespace" } */ +#define z~ /* { dg-error "requires whitespace" } */ +#define A>> /* { dg-error "requires whitespace" } */ +#define B<< /* { dg-error "requires whitespace" } */ +#define E&& /* { dg-error "requires whitespace" } */ +#define F|| /* { dg-error "requires whitespace" } */ +#define G== /* { dg-error "requires whitespace" } */ +#define H!= /* { dg-error "requires whitespace" } */ +#define I>= /* { dg-error "requires whitespace" } */ +#define J<= /* { dg-error "requires whitespace" } */ +#define K+= /* { dg-error "requires whitespace" } */ +#define L-= /* { dg-error "requires whitespace" } */ +#define M*= /* { dg-error "requires whitespace" } */ +#define N/= /* { dg-error "requires whitespace" } */ +#define O%= /* { dg-error "requires whitespace" } */ +#define P&= /* { dg-error "requires whitespace" } */ +#define Q|= /* { dg-error "requires whitespace" } */ +#define R^= /* { dg-error "requires whitespace" } */ +#define S>>= /* { dg-error "requires whitespace" } */ +#define T<<= /* { dg-error "requires whitespace" } */ +#define W... /* { dg-error "requires whitespace" } */ +#define X++ /* { dg-error "requires whitespace" } */ +#define Y-- /* { dg-error "requires whitespace" } */ +#define Z-> /* { dg-error "requires whitespace" } */ +#define aa:: /* { dg-error "requires whitespace" } */ +#define ab->* /* { dg-error "requires whitespace" } */ +#define ac.* /* { dg-error "requires whitespace" } */ +#define ad\x /* { dg-error "requires whitespace" } */ +#define ae\\x /* { dg-error "requires whitespace" } */ +#define af'1' /* { dg-error "requires whitespace" } */ +#define ag"abc" /* { dg-error "requires whitespace" } */ + +int dummy; diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-1.c b/gcc/testsuite/gcc.dg/cpp/normalize-1.c new file mode 100644 index 00000000000..967b29c2a66 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/normalize-1.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=c99" } */ + +\u00AA +\u00B7 +\u0F43 /* { dg-warning "not in NFC" } */ +a\u05B8\u05B9\u05B9\u05BBb + a\u05BB\u05B9\u05B8\u05B9b /* { dg-warning "not in NFC" } */ +\u09CB +\u09C7\u09BE /* { dg-warning "not in NFC" } */ +\u0B4B +\u0B47\u0B3E /* { dg-warning "not in NFC" } */ +\u0BCA +\u0BC6\u0BBE /* { dg-warning "not in NFC" } */ +\u0BCB +\u0BC7\u0BBE /* { dg-warning "not in NFC" } */ +\u0CCA +\u0CC6\u0CC2 /* { dg-warning "not in NFC" } */ +\u0D4A +\u0D46\u0D3E /* { dg-warning "not in NFC" } */ +\u0D4B +\u0D47\u0D3E /* { dg-warning "not in NFC" } */ + +K +\u212A /* { dg-warning "not in NFC" } */ + +\u03AC +\u1F71 /* { dg-warning "not in NFC" } */ + +\uAC00 +\u1100\u1161 /* { dg-warning "not in NFC" } */ +\uAC01 +\u1100\u1161\u11A8 /* { dg-warning "not in NFC" } */ +\uAC00\u11A8 /* { dg-warning "not in NFC" } */ +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-2.c b/gcc/testsuite/gcc.dg/cpp/normalize-2.c new file mode 100644 index 00000000000..eb61fa607ae --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/normalize-2.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -Wnormalized=nfkc" } */ + +\u00AA /* { dg-warning "not in NFKC" } */ +\u00B7 +\u0F43 /* { dg-warning "not in NFC" } */ +a\u05B8\u05B9\u05B9\u05BBb + a\u05BB\u05B9\u05B8\u05B9b /* { dg-warning "not in NFC" } */ +\u09CB +\u09C7\u09BE /* { dg-warning "not in NFC" } */ +\u0B4B +\u0B47\u0B3E /* { dg-warning "not in NFC" } */ +\u0BCA +\u0BC6\u0BBE /* { dg-warning "not in NFC" } */ +\u0BCB +\u0BC7\u0BBE /* { dg-warning "not in NFC" } */ +\u0CCA +\u0CC6\u0CC2 /* { dg-warning "not in NFC" } */ +\u0D4A +\u0D46\u0D3E /* { dg-warning "not in NFC" } */ +\u0D4B +\u0D47\u0D3E /* { dg-warning "not in NFC" } */ + +K +\u212A /* { dg-warning "not in NFC" } */ + +\u03AC +\u1F71 /* { dg-warning "not in NFC" } */ + +\uAC00 +\u1100\u1161 /* { dg-warning "not in NFC" } */ +\uAC01 +\u1100\u1161\u11A8 /* { dg-warning "not in NFC" } */ +\uAC00\u11A8 /* { dg-warning "not in NFC" } */ +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-3.c b/gcc/testsuite/gcc.dg/cpp/normalize-3.c new file mode 100644 index 00000000000..6205a68a545 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/normalize-3.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -Wnormalized=id" } */ + +\u00AA +\u00B7 +\u0F43 /* { dg-warning "not in NFC" } */ +a\u05B8\u05B9\u05B9\u05BBb + a\u05BB\u05B9\u05B8\u05B9b /* { dg-warning "not in NFC" } */ +\u09CB +\u09C7\u09BE /* { dg-warning "not in NFC" } */ +\u0B4B +\u0B47\u0B3E /* { dg-warning "not in NFC" } */ +\u0BCA +\u0BC6\u0BBE /* { dg-warning "not in NFC" } */ +\u0BCB +\u0BC7\u0BBE /* { dg-warning "not in NFC" } */ +\u0CCA +\u0CC6\u0CC2 /* { dg-warning "not in NFC" } */ +\u0D4A +\u0D46\u0D3E /* { dg-warning "not in NFC" } */ +\u0D4B +\u0D47\u0D3E /* { dg-warning "not in NFC" } */ + +K +\u212A + +\u03AC +\u1F71 /* { dg-warning "not in NFC" } */ + +\uAC00 +\u1100\u1161 +\uAC01 +\u1100\u1161\u11A8 +\uAC00\u11A8 +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/normalize-4.c b/gcc/testsuite/gcc.dg/cpp/normalize-4.c new file mode 100644 index 00000000000..c05df47d38d --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/normalize-4.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -Wnormalized=none" } */ + +\u00AA +\u00B7 +\u0F43 +a\u05B8\u05B9\u05B9\u05BBb + a\u05BB\u05B9\u05B8\u05B9b +\u09CB +\u09C7\u09BE +\u0B4B +\u0B47\u0B3E +\u0BCA +\u0BC6\u0BBE +\u0BCB +\u0BC7\u0BBE +\u0CCA +\u0CC6\u0CC2 +\u0D4A +\u0D46\u0D3E +\u0D4B +\u0D47\u0D3E + +K +\u212A + +\u03AC +\u1F71 + +\uAC00 +\u1100\u1161 +\uAC01 +\u1100\u1161\u11A8 +\uAC00\u11A8 +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/skipping2.c b/gcc/testsuite/gcc.dg/cpp/skipping2.c index 3b0d0f32c8e..61428c2b989 100644 --- a/gcc/testsuite/gcc.dg/cpp/skipping2.c +++ b/gcc/testsuite/gcc.dg/cpp/skipping2.c @@ -1,6 +1,8 @@ /* Copyright (C) 2001 Free Software Foundation, Inc. */ /* { dg-do preprocess } */ +/* APPLE LOCAL -Wextra-tokens */ +/* { dg-options "-Wextra-tokens" } */ /* Tests that excess tokens in skipped conditional blocks don't warn. */ diff --git a/gcc/testsuite/gcc.dg/cpp/tr-warn6.c b/gcc/testsuite/gcc.dg/cpp/tr-warn6.c index 5c94e4ca14a..e9aa851d041 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-warn6.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-warn6.c @@ -13,7 +13,7 @@ #define foo7(AA, hello, world, EEE) sdf "A B hello C,world,DhelloE F" fds EEE /* { dg-warning "macro argument \"hello\" would be stringified" "traditional stringification" } */ /* Catch the second warning from the above line. */ -/* { dg-warning "macro argument \"world\" would be stringified" "traditional stringification" { target *-*-* } 13 } */ +/* { dg-warning "macro argument \"world\" would be stringified" "traditional stringification second warning" { target *-*-* } 13 } */ # 19 "sys-header.h" 3 /* We are in system headers now, no -Wtraditional warnings should issue. */ diff --git a/gcc/testsuite/gcc.dg/cpp/trad/comment-3.c b/gcc/testsuite/gcc.dg/cpp/trad/comment-3.c index e2710ad5629..4694b1a922a 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/comment-3.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/comment-3.c @@ -1,6 +1,8 @@ /* Test we don't accept C++ comments. */ /* { dg-do preprocess } */ +/* APPLE LOCAL -Wextra-tokens 2001-08-01 --sts */ +/* { dg-options "-traditional-cpp -Wextra-tokens" } */ #if 0 #endif // /* { dg-warning "extra tokens" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-1.c b/gcc/testsuite/gcc.dg/cpp/ucnid-1.c new file mode 100644 index 00000000000..5f19eed903f --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-1.c @@ -0,0 +1,28 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ +void abort (void); + +#define \u00C0 1 +#define \u00C1 2 +#define \U000000C2 3 +#define wh\u00ff 4 +#define a\u00c4b\u0441\U000003b4e 5 + +int main (void) +{ + + if (\u00C0 != 1) + abort (); + if (\u00c1 != 2) + abort (); + if (\u00C2 != 3) + abort (); + if (wh\u00ff != 4) + abort (); + if (a\u00c4b\u0441\U000003b4e != 5) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-2.c b/gcc/testsuite/gcc.dg/cpp/ucnid-2.c new file mode 100644 index 00000000000..02ffdaf32ee --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-2.c @@ -0,0 +1,18 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ +#include <stdlib.h> +#include <string.h> + +#define str(t) #t + +int main (void) +{ + const char s[] = str (\u30b2); + + if (strcmp (s, "\u30b2") != 0) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-3.c b/gcc/testsuite/gcc.dg/cpp/ucnid-3.c new file mode 100644 index 00000000000..e04f092a616 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-3.c @@ -0,0 +1,9 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do compile } */ +/* { dg-options "-std=c99" } */ + +#define paste(x, y) x ## y + +int paste(\u00aa, \u0531) = 3; + +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-4.c b/gcc/testsuite/gcc.dg/cpp/ucnid-4.c new file mode 100644 index 00000000000..395c0d4e311 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-4.c @@ -0,0 +1,19 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=c99" } */ + +\u00AA +\u00AB /* { dg-error "not valid in an identifier" } */ +\u00B6 /* { dg-error "not valid in an identifier" } */ +\u00BA +\u00C0 +\u00D6 +\u0384 + +\u0669 /* { dg-error "not valid at the start of an identifier" } */ +A\u0669 +0\u00BA +0\u0669 +\u0E59 /* { dg-error "not valid at the start of an identifier" } */ +A\u0E59 +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-5.c b/gcc/testsuite/gcc.dg/cpp/ucnid-5.c new file mode 100644 index 00000000000..3ede8f728d1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-5.c @@ -0,0 +1,19 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do preprocess } */ +/* { dg-options "-std=c99 -pedantic" } */ + +\u00AA +\u00AB /* { dg-error "not valid in an identifier" } */ +\u00B6 /* { dg-error "not valid in an identifier" } */ +\u00BA +\u00C0 +\u00D6 +\u0384 /* { dg-error "not valid in an identifier" } */ + +\u0669 /* { dg-error "not valid at the start of an identifier" } */ +A\u0669 +0\u00BA +0\u0669 +\u0E59 /* { dg-error "not valid at the start of an identifier" } */ +A\u0E59 +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-6.c b/gcc/testsuite/gcc.dg/cpp/ucnid-6.c new file mode 100644 index 00000000000..1bc491bfa32 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-6.c @@ -0,0 +1,7 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do compile } */ +/* { dg-options "-std=c89" } */ +#define a b( +#define b(x) q +int a\u00aa); +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-7.c b/gcc/testsuite/gcc.dg/cpp/ucnid-7.c new file mode 100644 index 00000000000..57476d5cb68 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/ucnid-7.c @@ -0,0 +1,7 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do compile } */ +/* { dg-options "-std=c99" } */ +#define a b( +#define b(x) q +int a\U0000000z ); +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c new file mode 100644 index 00000000000..45e93737283 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c @@ -0,0 +1,13 @@ +/* Test to make sure the mcaro info includes a start file command for the main source */ +/* { dg-do compile */ +/* { dg-options "-g3 -gdwarf-2 -dA -fverbose-asm" } */ +/* { dg-final { scan-assembler "Start new file" } } */ + +#define ADD(x) (M + x) + +int main (void) +{ +#define N 28 +#define M 42 + return ADD(N); +} diff --git a/gcc/testsuite/gcc.dg/deprecated.c b/gcc/testsuite/gcc.dg/deprecated.c index 1e07efe6314..6ca95d42a74 100644 --- a/gcc/testsuite/gcc.dg/deprecated.c +++ b/gcc/testsuite/gcc.dg/deprecated.c @@ -53,10 +53,10 @@ int func1() int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */ - /* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */ - /* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */ - /* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */ - return f1(); /* { dg-warning "'f1' is deprecated" "" } */ + /* { dg-warning "'y' is deprecated" "y" { target *-*-* } 55 } */ + /* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } 55 } */ + /* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } 55 } */ + return f1(); /* { dg-warning "'f1' is deprecated" "f1" } */ } int func2(S1 *p) @@ -71,7 +71,7 @@ int func2(S1 *p) p->u1.field5 = g1 + p->field7; p->u2.field9; /* { dg-warning "'u2' is deprecated" "" } */ return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" "" } */ - /* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */ + /* { dg-warning "'field8' is deprecated" "field8" { target *-*-* } 73 } */ } struct SS1 { diff --git a/gcc/testsuite/gcc.dg/enum3.c b/gcc/testsuite/gcc.dg/enum3.c new file mode 100644 index 00000000000..ba3c1da15e3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/enum3.c @@ -0,0 +1,11 @@ +/* Test for non-integer enum values. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +enum e { E, F }; +enum e2 { + E1 = (void *)4, /* { dg-error "error: enumerator value for 'E1' is not an integer constant" } */ + E2 = (enum e)F, + E3 = (_Bool)1 +}; diff --git a/gcc/testsuite/gcc.dg/framework-2.c b/gcc/testsuite/gcc.dg/framework-2.c new file mode 100644 index 00000000000..1fad935a903 --- /dev/null +++ b/gcc/testsuite/gcc.dg/framework-2.c @@ -0,0 +1,5 @@ +/* APPLE LOCAL file mainline */ +/* { dg-do compile { target *-*-darwin* } } */ +/* { dg-options "-F$srcdir/gcc.dg" } */ + +#include <Foundation/Foundation.h> /* { dg-error "error: Foundation/Foundation.h: No such file" } */ diff --git a/gcc/testsuite/gcc.dg/i386-387-7.c b/gcc/testsuite/gcc.dg/i386-387-7.c index 210917ad415..1a40cd719d8 100644 --- a/gcc/testsuite/gcc.dg/i386-387-7.c +++ b/gcc/testsuite/gcc.dg/i386-387-7.c @@ -1,5 +1,6 @@ /* Verify that 387 fsincos instruction is generated. */ /* { dg-do compile { target "i?86-*-*" } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-options "-O -ffast-math -march=i686" } */ /* { dg-final { scan-assembler "fsincos" } } */ diff --git a/gcc/testsuite/gcc.dg/i386-3dnowA-1.c b/gcc/testsuite/gcc.dg/i386-3dnowA-1.c index 2ae1a04d5cb..b5327b3d9ec 100644 --- a/gcc/testsuite/gcc.dg/i386-3dnowA-1.c +++ b/gcc/testsuite/gcc.dg/i386-3dnowA-1.c @@ -1,4 +1,5 @@ /* { dg-do assemble { target i?86-*-* } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -m3dnow -march=athlon" } */ /* Test that the intrinsics compile with optimization. All of them are diff --git a/gcc/testsuite/gcc.dg/i386-3dnowA-2.c b/gcc/testsuite/gcc.dg/i386-3dnowA-2.c index d8ed6cb4c4d..ea336af4147 100644 --- a/gcc/testsuite/gcc.dg/i386-3dnowA-2.c +++ b/gcc/testsuite/gcc.dg/i386-3dnowA-2.c @@ -1,4 +1,5 @@ /* { dg-do assemble { target i?86-*-* } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -m3dnow -march=athlon" } */ /* Test that the intrinsics compile without optimization. All of them are diff --git a/gcc/testsuite/gcc.dg/i386-darwin-fpmath.c b/gcc/testsuite/gcc.dg/i386-darwin-fpmath.c new file mode 100644 index 00000000000..35798d6593a --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-darwin-fpmath.c @@ -0,0 +1,10 @@ +/* APPLE LOCAL file mainline 2005-04-11 4010614 */ +/* { dg-do compile { target i?86-*-darwin* } } */ +/* { dg-final { scan-assembler "addsd" } } */ +/* Do not add -msse or -msse2 or -mfpmath=sse to the options. GCC is + supposed to use SSE math on Darwin by default, and libm won't work + right if it doesn't. */ +double foo(double x, double y) +{ + return x + y; +} diff --git a/gcc/testsuite/gcc.dg/i386-xorps.c b/gcc/testsuite/gcc.dg/i386-xorps.c new file mode 100644 index 00000000000..450488c1fd2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-xorps.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL begin mainline 2005-04-13 */ +/* { dg-do compile { target i?86-*-* } } */ +/* { dg-options "-Os -msse2" } */ + +typedef float __m128 __attribute__ ((vector_size (16))); + +static __inline __m128 +_mm_mul_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_mulps (__A, __B); +} + +static __inline __m128 +_mm_sub_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_subps (__A, __B); +} + +__m128 POW_FUNC (__m128 x, __m128 y) +{ + __m128 xmm0 = x, xmm1 = y, xmm2; + + xmm0 = __builtin_ia32_xorps (xmm1, xmm1); + + xmm0 = _mm_mul_ps (xmm0, xmm1); + + xmm0 = _mm_sub_ps (xmm0, xmm1); + + xmm0 = _mm_mul_ps (xmm0, xmm1); + + return xmm0; +} +/* APPLE LOCAL end mainline 2005-04-13 */ diff --git a/gcc/testsuite/gcc.dg/init-bad-1.c b/gcc/testsuite/gcc.dg/init-bad-1.c index 7f20b8cbb0a..1fa1bfb2d82 100644 --- a/gcc/testsuite/gcc.dg/init-bad-1.c +++ b/gcc/testsuite/gcc.dg/init-bad-1.c @@ -10,8 +10,8 @@ void h(a) int a = 1; /* { dg-error "error: parameter 'a' is initialized" } */ { struct s x = { 0 }; /* { dg-error "error: variable 'x' has initializer but incomplete type" } */ - /* { dg-warning "excess elements|near init" "" { target *-*-* } 12 } */ - /* { dg-error "storage size" "" { target *-*-* } 12 } */ + /* { dg-warning "excess elements|near init" "excess" { target *-*-* } 12 } */ + /* { dg-error "storage size" "size" { target *-*-* } 12 } */ } char s[1] = "x"; @@ -19,27 +19,27 @@ char s1[1] = { "x" }; char t[1] = "xy"; /* { dg-warning "warning: initializer-string for array of chars is too long" } */ char t1[1] = { "xy" }; /* { dg-warning "warning: initializer-string for array of chars is too long" } */ char u[1] = { "x", "x" }; /* { dg-error "error: excess elements in char array initializer" } */ -/* { dg-error "near init" "" { target *-*-* } 21 } */ +/* { dg-error "near init" "near" { target *-*-* } 21 } */ int i = { }; /* { dg-error "error: empty scalar initializer" } */ -/* { dg-error "near init" "" { target *-*-* } 24 } */ +/* { dg-error "near init" "near" { target *-*-* } 24 } */ int j = { 1 }; int k = { 1, 2 }; /* { dg-warning "warning: excess elements in scalar initializer" } */ -/* { dg-warning "near init" "" { target *-*-* } 29 } */ +/* { dg-warning "near init" "near" { target *-*-* } 29 } */ int a1[1] = { [1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 32 } */ +/* { dg-error "near init" "near" { target *-*-* } 32 } */ int a2[1] = { [-1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 34 } */ +/* { dg-error "near init" "near" { target *-*-* } 34 } */ int a3[1] = { [0 ... 1] = 0 }; /* { dg-error "error: array index range in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 36 } */ +/* { dg-error "near init" "near" { target *-*-* } 36 } */ int a4[2] = { [1 ... 0] = 0 }; /* { dg-error "error: empty index range in initializer" } */ -/* { dg-error "near init" "" { target *-*-* } 38 } */ +/* { dg-error "near init" "near" { target *-*-* } 38 } */ int a5[2] = { [0 ... 2] = 0 }; /* { dg-error "error: array index range in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 40 } */ +/* { dg-error "near init" "near" { target *-*-* } 40 } */ int a6[2] = { [-1 ... 1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 42 } */ +/* { dg-error "near init" "near" { target *-*-* } 42 } */ int a7[] = { [-1 ... 1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 44 } */ +/* { dg-error "near init" "near" { target *-*-* } 44 } */ diff --git a/gcc/testsuite/gcc.dg/init-bad-2.c b/gcc/testsuite/gcc.dg/init-bad-2.c index 794cc412db3..23387e500f0 100644 --- a/gcc/testsuite/gcc.dg/init-bad-2.c +++ b/gcc/testsuite/gcc.dg/init-bad-2.c @@ -11,8 +11,8 @@ void h(a) int a = 1; /* { dg-error "error: parameter 'a' is initialized" } */ { struct s x = { 0 }; /* { dg-error "error: variable 'x' has initializer but incomplete type" } */ - /* { dg-warning "excess elements|near init" "" { target *-*-* } 13 } */ - /* { dg-error "storage size" "" { target *-*-* } 13 } */ + /* { dg-warning "excess elements|near init" "near" { target *-*-* } 13 } */ + /* { dg-error "storage size" "size" { target *-*-* } 13 } */ } char s[1] = "x"; @@ -20,14 +20,14 @@ char s1[1] = { "x" }; char t[1] = "xy"; /* { dg-warning "warning: initializer-string for array of chars is too long" } */ char t1[1] = { "xy" }; /* { dg-warning "warning: initializer-string for array of chars is too long" } */ char u[1] = { "x", "x" }; /* { dg-error "error: excess elements in char array initializer" } */ -/* { dg-error "near init" "" { target *-*-* } 22 } */ +/* { dg-error "near init" "near" { target *-*-* } 22 } */ int j = { 1 }; int k = { 1, 2 }; /* { dg-warning "warning: excess elements in scalar initializer" } */ -/* { dg-warning "near init" "" { target *-*-* } 27 } */ +/* { dg-warning "near init" "near" { target *-*-* } 27 } */ int a1[1] = { [1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 30 } */ +/* { dg-error "near init" "near" { target *-*-* } 30 } */ int a2[1] = { [-1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 32 } */ +/* { dg-error "near init" "near" { target *-*-* } 32 } */ diff --git a/gcc/testsuite/gcc.dg/init-bad-3.c b/gcc/testsuite/gcc.dg/init-bad-3.c index aed3d35a49f..bb149823dc1 100644 --- a/gcc/testsuite/gcc.dg/init-bad-3.c +++ b/gcc/testsuite/gcc.dg/init-bad-3.c @@ -11,8 +11,8 @@ void h(a) int a = 1; /* { dg-error "error: parameter 'a' is initialized" } */ { struct s x = { 0 }; /* { dg-error "error: variable 'x' has initializer but incomplete type" } */ - /* { dg-error "excess elements|near init" "" { target *-*-* } 13 } */ - /* { dg-error "storage size" "" { target *-*-* } 13 } */ + /* { dg-error "excess elements|near init" "near" { target *-*-* } 13 } */ + /* { dg-error "storage size" "size" { target *-*-* } 13 } */ } char s[1] = "x"; @@ -20,14 +20,14 @@ char s1[1] = { "x" }; char t[1] = "xy"; /* { dg-error "error: initializer-string for array of chars is too long" } */ char t1[1] = { "xy" }; /* { dg-error "error: initializer-string for array of chars is too long" } */ char u[1] = { "x", "x" }; /* { dg-error "error: excess elements in char array initializer" } */ -/* { dg-error "near init" "" { target *-*-* } 22 } */ +/* { dg-error "near init" "near" { target *-*-* } 22 } */ int j = { 1 }; int k = { 1, 2 }; /* { dg-error "error: excess elements in scalar initializer" } */ -/* { dg-error "near init" "" { target *-*-* } 27 } */ +/* { dg-error "near init" "near" { target *-*-* } 27 } */ int a1[1] = { [1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 30 } */ +/* { dg-error "near init" "near" { target *-*-* } 30 } */ int a2[1] = { [-1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */ -/* { dg-error "near init" "" { target *-*-* } 32 } */ +/* { dg-error "near init" "near" { target *-*-* } 32 } */ diff --git a/gcc/testsuite/gcc.dg/loop-3.c b/gcc/testsuite/gcc.dg/loop-3.c index 3cc6643e15d..f7ceaddb899 100644 --- a/gcc/testsuite/gcc.dg/loop-3.c +++ b/gcc/testsuite/gcc.dg/loop-3.c @@ -3,7 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-O3" } */ -/* { dg-options "-O3 -mtune=i386" { target i?86-*-* } } */ +/* { dg-options "-O3 -mtune=i386" { target { i?86-*-* && ilp32 } } } */ #if defined(STACK_SIZE) && (STACK_SIZE < 65536) # define BYTEMEM_SIZE 10000L diff --git a/gcc/testsuite/gcc.dg/lvalue-cast-1.c b/gcc/testsuite/gcc.dg/lvalue-cast-1.c new file mode 100644 index 00000000000..e434baf6e7e --- /dev/null +++ b/gcc/testsuite/gcc.dg/lvalue-cast-1.c @@ -0,0 +1,23 @@ +/* APPLE LOCAL file non lvalue assign */ +/* { dg-do compile } */ +/* { dg-options "-fnon-lvalue-assign -faltivec" } */ + +int foo(void) { + + char *p; + long l; + short s; + vector unsigned int vui; + volatile int *pvi; + + (long *)p = &l; /* { dg-warning "target of assignment not really an lvalue" } */ + ((long *)p)++; /* { dg-warning "target of assignment not really an lvalue" } */ + (short)l = 2; /* { dg-error "invalid lvalue" } */ + (long)s = 3; /* { dg-error "invalid lvalue" } */ + (int)pvi = 4; /* { dg-warning "target of assignment not really an lvalue" } */ + (int)pvi &= 5; /* { dg-warning "target of assignment not really an lvalue" } */ + + (vector float)vui = (vector float)(1.0, 2.0, 3.0, 4.0); /* { dg-warning "target of assignment not really an lvalue" } */ + + return 0; +} diff --git a/gcc/testsuite/gcc.dg/lvalue-cast-2.c b/gcc/testsuite/gcc.dg/lvalue-cast-2.c new file mode 100644 index 00000000000..bfd2e29e52c --- /dev/null +++ b/gcc/testsuite/gcc.dg/lvalue-cast-2.c @@ -0,0 +1,14 @@ +/* APPLE LOCAL file non lvalue assign */ +/* Allow lvalue casts in conjunction with '&'. */ +/* { dg-do compile } */ +/* { dg-options "-fnon-lvalue-assign" } */ + +int foo (void **ptr) { + return 1; +} + +int bar (void) { + char *string; + + return foo ((void **)&((char *)string)); /* { dg-warning "argument to .&. not really an lvalue" } */ +} diff --git a/gcc/testsuite/gcc.dg/lvalue-cond-1.c b/gcc/testsuite/gcc.dg/lvalue-cond-1.c new file mode 100644 index 00000000000..9f48adbdfe2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lvalue-cond-1.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file non lvalue assign */ +/* Allow assignments to conditional expressions, as long as the second and third + operands are already lvalues. */ +/* Author: Ziemowit Laski <zlaski@apple.com> */ +/* { dg-options "-fnon-lvalue-assign" } */ +/* { dg-do run } */ + +#include <stdlib.h> + +int g1 = 3, g2 = 5; + +void assign_val1 (int which, int value) { + (which ? g1 : g2) = value; /* { dg-warning "target of assignment not really an lvalue" } */ +} + +void assign_val2 (int which) { + (which ? g1 : g2)++; /* { dg-warning "target of assignment not really an lvalue" } */ +} + +int main(void) { + assign_val1 (0, 15); + if (g1 != 3 || g2 != 15) + abort (); + + assign_val2 (1); + if (g1 != 4 || g2 != 15) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.dg/lvalue1.c b/gcc/testsuite/gcc.dg/lvalue1.c index 7e21608ab36..36fb9d8e0a5 100644 --- a/gcc/testsuite/gcc.dg/lvalue1.c +++ b/gcc/testsuite/gcc.dg/lvalue1.c @@ -1,5 +1,7 @@ /* PR c/5225 */ /* { dg-do compile } */ +/* APPLE LOCAL non lvalue assign */ +/* { dg-options "-fno-non-lvalue-assign" } */ int main() { diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c index d957f868405..0d280bb5793 100644 --- a/gcc/testsuite/gcc.dg/m-un-2.c +++ b/gcc/testsuite/gcc.dg/m-un-2.c @@ -16,7 +16,7 @@ struct vtable mtable = { malloc, free }; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */ - /* { dg-warning "initialization for 'mtable._realloc'" "warning regression" { target *-*-* } {18} } */ + /* { dg-warning "initialization for 'mtable._realloc'" "warning regression 2" { target *-*-* } {18} } */ /* With designated initializers, we assume you meant to leave out the initialization of any blank fields. */ diff --git a/gcc/testsuite/gcc.dg/mac68k-pragma-unsup-1.c b/gcc/testsuite/gcc.dg/mac68k-pragma-unsup-1.c new file mode 100644 index 00000000000..2250d0edfed --- /dev/null +++ b/gcc/testsuite/gcc.dg/mac68k-pragma-unsup-1.c @@ -0,0 +1,12 @@ +/* APPLE LOCAL file 64-bit mainline */ +/* 64-bit Darwin officially doesn't like the mac68k alignment pragma. */ + +/* { dg-do compile { target powerpc*-*-darwin[89]* } } */ +/* { dg-options "-m64" } */ + +#pragma options align=mac68k /* { dg-warning "mac68k alignment pragma is deprecated for 64-bit Darwin" } */ + +#pragma options align=reset /* this shouldn't error out */ + + + diff --git a/gcc/testsuite/gcc.dg/old-style-then-proto-1.c b/gcc/testsuite/gcc.dg/old-style-then-proto-1.c new file mode 100644 index 00000000000..abe02d06378 --- /dev/null +++ b/gcc/testsuite/gcc.dg/old-style-then-proto-1.c @@ -0,0 +1,44 @@ +/* Test for old-style definition followed by prototype declaration. + Mismatched qualifiers used to be wrongly forbidden. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +void f1() {} +void f1(void); /* { dg-warning "warning: prototype for 'f1' follows non-prototype definition" } */ + +void f2() {} /* { dg-error "error: previous definition of 'f2' was here" } */ +void f2(int); /* { dg-error "error: prototype for 'f2' declares more arguments than previous old-style definition" } */ + +void f3(a) int a; {} /* { dg-error "error: previous definition of 'f3' was here" } */ +void f3(void); /* { dg-error "error: prototype for 'f3' declares fewer arguments than previous old-style definition" } */ + +void f4(a) int a; {} +void f4(int); /* { dg-warning "warning: prototype for 'f4' follows non-prototype definition" } */ + +void f5(a) int a; {} /* { dg-error "error: previous definition of 'f5' was here" } */ +void f5(int, int); /* { dg-error "error: prototype for 'f5' declares more arguments than previous old-style definition" } */ + +void f6(a) int a; {} /* { dg-error "error: previous definition of 'f6' was here" } */ +void f6(int, ...); /* { dg-error "error: conflicting types for 'f6'" } */ + +void f7(a, b) int a, b; {} /* { dg-error "error: previous definition of 'f7' was here" } */ +void f7(int); /* { dg-error "error: prototype for 'f7' declares fewer arguments than previous old-style definition" } */ + +void f8(a, b) int a, b; {} /* { dg-error "error: previous definition of 'f8' was here" } */ +void f8(int, ...); /* { dg-error "error: conflicting types for 'f8'" } */ + +void f9(a, b) int a, b; {} +void f9(int, int); /* { dg-warning "warning: prototype for 'f9' follows non-prototype definition" } */ + +void f10(a, b) int a, b; {} /* { dg-error "error: previous definition of 'f10' was here" } */ +void f10(int, long); /* { dg-error "error: prototype for 'f10' declares argument 2 with incompatible type" } */ + +void f11(a, b) int a, b; {} /* { dg-error "error: previous definition of 'f11' was here" } */ +void f11(long, int); /* { dg-error "error: prototype for 'f11' declares argument 1 with incompatible type" } */ + +void f12(a, b) const int a; volatile int b; {} +void f12(volatile int, const int); /* { dg-warning "warning: prototype for 'f12' follows non-prototype definition" } */ + +void f13(a) const int a[2][2]; {} /* { dg-error "error: previous definition of 'f13' was here" } */ +void f13(volatile int [2][2]); /* { dg-error "error: prototype for 'f13' declares argument 1 with incompatible type" } */ diff --git a/gcc/testsuite/gcc.dg/parm-mismatch-1.c b/gcc/testsuite/gcc.dg/parm-mismatch-1.c index 59d9447b2e0..6b82b7be1b2 100644 --- a/gcc/testsuite/gcc.dg/parm-mismatch-1.c +++ b/gcc/testsuite/gcc.dg/parm-mismatch-1.c @@ -6,13 +6,13 @@ void f0(); /* { dg-error "error: previous declaration of 'f0' was here" } */ void f0(int, ...); /* { dg-error "error: conflicting types for 'f0'" } */ -/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "" { target *-*-* } 8 } */ +/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } 8 } */ void f1(int, ...); /* { dg-error "error: previous declaration of 'f1' was here" } */ void f1(); /* { dg-error "error: conflicting types for 'f1'" } */ -/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "" { target *-*-* } 11 } */ +/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } 11 } */ void f2(); /* { dg-error "error: previous declaration of 'f2' was here" } */ void f2(char); /* { dg-error "error: conflicting types for 'f2'" } */ -/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "" { target *-*-* } 14 } */ +/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } 14 } */ void f3(char); /* { dg-error "error: previous declaration of 'f3' was here" } */ void f3(); /* { dg-error "error: conflicting types for 'f3'" } */ -/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "" { target *-*-* } 17 } */ +/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } 17 } */ diff --git a/gcc/testsuite/gcc.dg/pch/apple-altivec-1.c b/gcc/testsuite/gcc.dg/pch/apple-altivec-1.c new file mode 100644 index 00000000000..5f2e93f365e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/apple-altivec-1.c @@ -0,0 +1,126 @@ +/* APPLE LOCAL file AltiVec */ +/* { dg-do compile { target powerpc-*-darwin* } } */ +/* { dg-options "-faltivec -I." } */ + +#include "apple-altivec-1.h" + +/* Test for correct handling of AltiVec constants passed + through '...' (va_arg). */ + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +#define CHECK_INVARIANT(expr) \ + if (!(expr)) { \ + printf ("ASSERT FAILED: %d: %s\n", __LINE__, #expr); \ + abort (); \ + } + +struct foo { int x; int y; }; +struct vfoo { int x; __vector signed int v; int y; }; +union u { __vector signed int v; signed int i[4]; }; + +struct foo x_g = { 3, 4}; +struct vfoo vx_g = { 10, (vector signed int)(11, 12, 13, 14), 15 }; +__vector signed int v_g = (vector signed int) (22, 23, 24, 25); +struct vfoo vx2_g = { 30, (vector signed int)(31, 32, 33, 34), 35 }; +__vector signed int v2_g = (vector signed int)(40, 41, 42, 43); +int i_1 = 99, i_2 = 33; +double d_2 = 1.5, d_3 = 1.75; +long double ld_1 = 1.25; + +void bar (int i, ... ) +{ + struct foo xi; + double d; + long double ld; + float f; + char c; + short s; + va_list ap; + va_start(ap, i); + xi = va_arg(ap, struct foo); + s = (short)va_arg(ap, int); + f = (float)va_arg(ap, double); + ld = va_arg(ap, long double); + c = (char)va_arg(ap, int); + d = va_arg(ap, double); + va_end(ap); + + CHECK_INVARIANT (xi.x == x_g.x && xi.y == x_g.y); + CHECK_INVARIANT (s == (short)i_2); + CHECK_INVARIANT (f == (float)d_2); + CHECK_INVARIANT (ld == ld_1); + CHECK_INVARIANT (c == (char)i_1); + CHECK_INVARIANT (d == d_3); +} + +void baz (int i, ... ) +{ + struct vfoo vx, vx2; + __vector signed int v_i, v2_i; + int j, k, l; + va_list ap; + va_start(ap, i); + v_i = va_arg(ap, __vector signed int); + j = va_arg(ap, int); + vx = va_arg(ap, struct vfoo); + k = va_arg(ap, int); + v2_i = va_arg(ap, __vector signed int); + l = va_arg(ap, int); + vx2 = va_arg(ap, struct vfoo); + va_end(ap); + + CHECK_INVARIANT (vec_all_eq (v_i, v_g)); + CHECK_INVARIANT (j == i_1); + CHECK_INVARIANT (vx.x == vx_g.x && vec_all_eq(vx.v, vx_g.v) && vx.y == vx_g.y); + CHECK_INVARIANT (k == i_1); + CHECK_INVARIANT (vec_all_eq (v2_i, v2_g)); + CHECK_INVARIANT (l == i_1); + CHECK_INVARIANT (vx2.x == vx2_g.x && vec_all_eq(vx2.v, vx2_g.v) && vx2.y == vx2_g.y); +} + +void quux (int i, ... ) +{ + __vector signed int v_i, v2_i; + union u vi, v2i; + va_list ap; + va_start(ap, i); + v_i = va_arg(ap, __vector signed int); + v2_i = va_arg(ap, __vector signed int); + va_end(ap); + vi.v = v_i; + v2i.v = v2_i; + + CHECK_INVARIANT (vec_all_eq (v_i, v_g)); + CHECK_INVARIANT (vec_all_eq (v2_i, v_g)); + CHECK_INVARIANT (vec_all_eq (vi.v, v_g)); + CHECK_INVARIANT (vec_all_eq (v2i.v, v_g)); +} + +void baz2 (int i, ... ) +{ + struct vfoo vx; + union u vxi; + va_list ap; + va_start(ap, i); + vx = va_arg(ap, struct vfoo); + va_end(ap); + vxi.v = vx.v; + + CHECK_INVARIANT (vx.x == vx_g.x && vec_all_eq(vx.v, vx_g.v) && vx.y == vx_g.y); + CHECK_INVARIANT (vec_all_eq (vxi.v, vx_g.v)); +} + +int main(void) +{ + CHECK_INVARIANT (sizeof(struct foo) == 8 && sizeof(struct vfoo) == 48); + + bar(i_1, x_g, (short)i_2, (float)d_2, ld_1, (char)i_1, d_3); + baz(i_1, v_g, i_1, vx_g, i_1, v2_g, i_1, vx2_g); + quux(i_1, v_g, v_g); + baz2(i_1, vx_g); + + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pch/apple-altivec-1.hs b/gcc/testsuite/gcc.dg/pch/apple-altivec-1.hs new file mode 100644 index 00000000000..156bdf74eba --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/apple-altivec-1.hs @@ -0,0 +1,2 @@ +/* APPLE LOCAL file AltiVec */ +/* { dg-options "-faltivec" } */ diff --git a/gcc/testsuite/gcc.dg/pch/faltivec-1.c b/gcc/testsuite/gcc.dg/pch/faltivec-1.c new file mode 100644 index 00000000000..5824d4155cc --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/faltivec-1.c @@ -0,0 +1,17 @@ +/* APPLE LOCAL file AltiVec */ +/* { dg-do compile { target powerpc-*-darwin* } } */ +/* { dg-options "-faltivec -I. -mcpu=G5" } */ + +#include "faltivec-1.h" +/* { dg-error "No such file or directory" "" { target *-*-* } 5 } */ +/* { dg-error "one or more PCH files were found" "" { target *-*-* } 5 } */ +/* { dg-error "use -Winvalid-pch for more information" "" { target *-*-* } 5 } */ + +/* Test for correct PCH validation of -faltivec. */ +void foo() +{ + const vector signed short vconst = (vector signed short) (0,0,0,0,0,0,0,0); + const vector signed short vconst2 = vec_splat(vconst, 0); + bar(); +} + diff --git a/gcc/testsuite/gcc.dg/pch/faltivec-1.hs b/gcc/testsuite/gcc.dg/pch/faltivec-1.hs new file mode 100644 index 00000000000..c24c35cefae --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/faltivec-1.hs @@ -0,0 +1,3 @@ +/* APPLE LOCAL file AltiVec */ +/* { dg-options " -mcpu=G5" } */ +extern void bar(); diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp index 79fd9e77139..7f6334efbce 100644 --- a/gcc/testsuite/gcc.dg/pch/pch.exp +++ b/gcc/testsuite/gcc.dg/pch/pch.exp @@ -26,6 +26,29 @@ dg-init set old_dg_do_what_default "${dg-do-what-default}" +# APPLE LOCAL begin +# Test MACOSX_DEPLOYMENT_TARGET +set macosx_deployment_target env(MACOSX_DEPLOYMENT_TARGET) +setenv MACOSX_DEPLOYMENT_TARGET 10.2 +set test "cfstring-1.c" +set f [open $test w] +set v 0 +puts $f "#include \"cfstring-1.h\"" +puts $f "/* { dg-options \"-I./ -Winvalid-pch -save-temps\" } */" +puts $f "void foo\(\) { x = 0; }" +puts $f "" +close $f +set testh "cfstring-1.hs" +set f [open $testh w] +puts $f "int x;" +puts $f "" +close $f +dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h" +set MACOSX_DEPLOYMENT_TARGET $macosx_deployment_target +file delete $test +file delete $testh +# APPLE LOCAL end + # Main loop. foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { global torture_without_loops diff --git a/gcc/testsuite/gcc.dg/pr12092-1.c b/gcc/testsuite/gcc.dg/pr12092-1.c index 8f38a4a7f46..1b29452881f 100644 --- a/gcc/testsuite/gcc.dg/pr12092-1.c +++ b/gcc/testsuite/gcc.dg/pr12092-1.c @@ -1,6 +1,7 @@ /* PR rtl-optimization/12092 */ /* Test case reduced by Andrew Pinski <pinskia@physics.uc.edu> */ /* { dg-do compile { target i?86-*-* } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2 -mtune=i486 -march=pentium4 -fprefetch-loop-arrays" } */ void DecodeAC(int index,int *matrix) diff --git a/gcc/testsuite/gcc.dg/pr18628.c b/gcc/testsuite/gcc.dg/pr18628.c new file mode 100644 index 00000000000..d365075b729 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr18628.c @@ -0,0 +1,31 @@ +/* { dg-do link } */ +/* { dg-options "-O2" } */ + +/* PR middle-end/18628 exposed a problem in which cse folded a load + from a jump table into the label that was the target of the branch. + Unfortunately, the indirect jump was moved to a different basic + block, and the LABEL_REF copied to the register wasn't enough to + keep the cfg from optimizing the otherwise-unused label away. So + we ended up with a dangling reference to the label. */ + +int i; + +int main() +{ + for (;;) + { + switch (i) + { + case 0: + case 1: + return 1; + + case 2: + case 3: + return 0; + + case 5: + --i; + } + } +} diff --git a/gcc/testsuite/gcc.dg/pr19345.c b/gcc/testsuite/gcc.dg/pr19345.c new file mode 100644 index 00000000000..40c6de4d836 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr19345.c @@ -0,0 +1,12 @@ +/* We shouldn't crash trying to produce the inlined structure type die debug info. */ +/* { dg-do compile } */ +/* { dg-options "-O1 -g" } */ +inline void bar(char a[], unsigned int l) +{ + asm volatile ("" :: "m" ( *(struct {char x[l]; } *)a)); +} + +void foo(void) +{ + bar (0, 0); +} diff --git a/gcc/testsuite/gcc.dg/pr19967.c b/gcc/testsuite/gcc.dg/pr19967.c new file mode 100644 index 00000000000..85afeafe285 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr19967.c @@ -0,0 +1,26 @@ +/* PR middle-end/19967 + These functions mentioned below are supposed to return char *. + However, fold_builtin_... had bugs that caused the return types to + be const char *. */ + +/* { dg-do compile } */ +/* { dg-options "-pedantic" } */ + +char *strchr(const char *, int); +char *strrchr(const char *, int); +char *index(const char *, int); +char *rindex(const char *, int); +char *strpbrk(const char *, const char *); +char *strstr(const char *, const char *); +char *p; + +void +f (void) +{ + p = strchr(__func__, 'f'); + p = strrchr(__func__, 'f'); + p = index(__func__, 'f'); + p = rindex(__func__, 'f'); + p = strpbrk(__func__, "f"); + p = strstr(__func__, "f"); +} diff --git a/gcc/testsuite/gcc.dg/pr20017.c b/gcc/testsuite/gcc.dg/pr20017.c new file mode 100644 index 00000000000..16bd72b315d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20017.c @@ -0,0 +1,41 @@ +/* PR rtl-optimization/20017 + + After CSE/GCSE folds a switch statement to an unconditional jump, + cfg_cleanup did not remove a dead jump table, confusing the CFG + layout code later on. */ + +/* { dg-do compile } */ +/* { dg-options "-O1" } */ +/* { dg-options "-O1 -march=i386" { target { i?86-*-* && ilp32 } } } */ + +int +foo (int *buf, int *p) +{ + int result; + const int *tmp; + + if (*buf) + return 1; + + result = 2; + *buf = 2; + tmp = buf; + switch (*tmp) + { + case 3: + case 4: + case 6: + case 14: + return 1; + + case 0: + result = *p; + + /* Fall through. */ + default: + if (result) + return 1; + } + + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr20054.c b/gcc/testsuite/gcc.dg/pr20054.c new file mode 100644 index 00000000000..292b856d014 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20054.c @@ -0,0 +1,23 @@ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-strict-aliasing" } */ + + +unsigned int *foo (void); + +char * +bar (double *d) +{ + return (char *) (d + 1) - sizeof (unsigned int); +} + +char +baz (double x) +{ + unsigned int h = *foo (); + unsigned int l = *(unsigned int *) bar (&x); + + return (h & ~0x80000000L) == 0x7FF00000 && l == 0; +} + + diff --git a/gcc/testsuite/gcc.dg/pr20100.c b/gcc/testsuite/gcc.dg/pr20100.c new file mode 100644 index 00000000000..988fbda6429 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20100.c @@ -0,0 +1,32 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +int func_pure (void) __attribute__ ((pure)); +void func_other (int); +int global_int; +void abort (); +void func_other(int a) +{ + if (a != global_int) + abort (); + global_int++; +} + +int func_pure(void) +{ + return global_int; +} + +int +func_loop (int arg) +{ + // global_int ++; + while (arg--) + func_other (func_pure ()); +} + +int main(void) +{ + func_loop(10); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr20115-1.c b/gcc/testsuite/gcc.dg/pr20115-1.c new file mode 100644 index 00000000000..d1c4066729f --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20115-1.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-dom1" } */ + +extern int foo (void) __attribute__((pure)); + +int bar() +{ + int a = foo (); + a += foo (); + return a; +} + +/* Check that we only have one call to foo. */ +/* { dg-final { scan-tree-dump-times "foo" 1 "dom1" } } */ diff --git a/gcc/testsuite/gcc.dg/pr20115.c b/gcc/testsuite/gcc.dg/pr20115.c new file mode 100644 index 00000000000..cea4b486854 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20115.c @@ -0,0 +1,28 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ + +int func_pure (void); +void func_other (int); +int global_int; +int func_pure (void) { return global_int; } +void func_other (int a) +{ + global_int = a + 1; +} +int f(void) +{ + int a; + a = func_pure(); + func_other (a); + a = func_pure (); // We were removing this function call + return a; +} +void abort (void); + +int main(void) +{ + global_int = 10; + if (f() != 11) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr20204.c b/gcc/testsuite/gcc.dg/pr20204.c new file mode 100644 index 00000000000..ad85af5baa3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20204.c @@ -0,0 +1,34 @@ +/* { dg-do run { target i?86-*-* } } */ +/* { dg-options "-O2" } */ + +void *x (void *pdst, const void *psrc, unsigned int pn) +{ + register void *return_dst = pdst; + register unsigned char *dst = pdst; + register unsigned const char *src = psrc; + register int n __asm__ ("ebx") = pn; + + if (src < dst && dst < src + n) + { + src += n; + dst += n; + while (n--) + *--dst = *--src; + return return_dst; + } + + while (n >= 16) n--; + + return return_dst; +} +extern void abort (); +extern void exit (int); +char xx[30] = "abc"; +int main (void) +{ + char yy[30] = "aab"; + + if (x (xx + 1, xx, 2) != xx + 1 || memcmp (xx, yy, sizeof (yy)) != 0) + abort (); + exit (0); +} diff --git a/gcc/testsuite/gcc.dg/pr20216.c b/gcc/testsuite/gcc.dg/pr20216.c new file mode 100644 index 00000000000..8baba44a030 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20216.c @@ -0,0 +1,16 @@ +/* APPLE LOCAL file why is this local? */ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ + +static unsigned int *buffer; + +void FUNC (void) +{ + unsigned int *base; + int i, j; + + for (i = 0; i < 4; i++) + for (j = 0; j < 1600000; j++) + *base++ = buffer[j]; +} + diff --git a/gcc/testsuite/gcc.dg/pr20368-1.c b/gcc/testsuite/gcc.dg/pr20368-1.c new file mode 100644 index 00000000000..a88c7f803b7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20368-1.c @@ -0,0 +1,12 @@ +/* ICE with -Wstrict-prototypes and typeof an undeclared function. + Bug 20368. */ +/* { dg-do compile } */ +/* { dg-options "-Wstrict-prototypes" } */ + +extern __typeof (f) g; /* { dg-error "error: 'f' undeclared here \\(not in a function\\)" } */ + +int +f (x) + float x; +{ +} diff --git a/gcc/testsuite/gcc.dg/pr20368-2.c b/gcc/testsuite/gcc.dg/pr20368-2.c new file mode 100644 index 00000000000..e3c8396233e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20368-2.c @@ -0,0 +1,12 @@ +/* ICE with -Wstrict-prototypes and typeof an undeclared function. + Bug 20368. Test with -Wmissing-prototypes. */ +/* { dg-do compile } */ +/* { dg-options "-Wmissing-prototypes" } */ + +extern __typeof (f) g; /* { dg-error "error: 'f' undeclared here \\(not in a function\\)" } */ + +int +f (x) + float x; +{ +} diff --git a/gcc/testsuite/gcc.dg/pr20368-3.c b/gcc/testsuite/gcc.dg/pr20368-3.c new file mode 100644 index 00000000000..32095999676 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20368-3.c @@ -0,0 +1,12 @@ +/* ICE with -Wstrict-prototypes and typeof an undeclared function. + Bug 20368. Test with -Wmissing-declarations. */ +/* { dg-do compile } */ +/* { dg-options "-Wmissing-declarations" } */ + +extern __typeof (f) g; /* { dg-error "error: 'f' undeclared here \\(not in a function\\)" } */ + +int +f (x) + float x; +{ +} diff --git a/gcc/testsuite/gcc.dg/pragma-darwin.c b/gcc/testsuite/gcc.dg/pragma-darwin.c index da70c8918a0..7d5d22bb667 100644 --- a/gcc/testsuite/gcc.dg/pragma-darwin.c +++ b/gcc/testsuite/gcc.dg/pragma-darwin.c @@ -14,20 +14,30 @@ extern void abort(void); #pragma options 23 /* { dg-error "malformed '#pragma options'" } */ #pragma options align /* { dg-error "malformed '#pragma options'" } */ -#pragma options align mac68k /* { dg-error "malformed '#pragma options'" } */ +/* APPLE LOCAL 64-bit mainline */ +#pragma options align natural /* { dg-error "malformed '#pragma options'" } */ #pragma options align=45 /* { dg-error "malformed '#pragma options'" } */ #pragma options align=foo /* { dg-error "malformed '#pragma options align" } */ +/* APPLE LOCAL 64-bit mainline */ +#ifndef __LP64__ #pragma options align=mac68k struct s1 { short f1; int f2; }; +/* APPLE LOCAL 64-bit mainline */ +#endif #pragma options align=power struct s2 { short f1; int f2; }; +/* APPLE LOCAL 64-bit mainline */ +#ifndef __LP64__ #pragma options align=mac68k struct s3 { short f1; int f2; }; +/* APPLE LOCAL 64-bit mainline */ +#endif #pragma options align=reset struct s4 { short f1; int f2; }; -#pragma options align=mac68k foo /* { dg-warning "junk at end of '#pragma options'" } */ +/* APPLE LOCAL 64-bit mainline */ +#pragma options align=natural foo /* { dg-warning "junk at end of '#pragma options'" } */ /* Segment pragmas don't do anything anymore. */ @@ -39,12 +49,20 @@ main () int x, z; /* { dg-warning "unused variable" } */ #pragma unused (x, y) +/* APPLE LOCAL 64-bit mainline */ +#ifndef __LP64__ if (sizeof (struct s1) != 6) abort (); +/* APPLE LOCAL 64-bit mainline */ +#endif if (sizeof (struct s2) != 8) abort (); +/* APPLE LOCAL 64-bit mainline */ +#ifndef __LP64__ if (sizeof (struct s3) != 6) abort (); +/* APPLE LOCAL 64-bit mainline */ +#endif if (sizeof (struct s4) != 8) abort (); return 0; diff --git a/gcc/testsuite/gcc.dg/redecl-1.c b/gcc/testsuite/gcc.dg/redecl-1.c index 14877667e91..75ce208457c 100644 --- a/gcc/testsuite/gcc.dg/redecl-1.c +++ b/gcc/testsuite/gcc.dg/redecl-1.c @@ -94,7 +94,7 @@ static int test7(int x) void prime8(void) { test8(); /* { dg-warning "previous" "" } */ - /* { dg-warning "implicit" "" { target *-*-* } 96 } */ + /* { dg-warning "implicit" "implicit" { target *-*-* } 96 } */ } static int test8(int x) diff --git a/gcc/testsuite/gcc.dg/short-compare-1.c b/gcc/testsuite/gcc.dg/short-compare-1.c index 6a4e388d179..7ecca243a7c 100644 --- a/gcc/testsuite/gcc.dg/short-compare-1.c +++ b/gcc/testsuite/gcc.dg/short-compare-1.c @@ -3,7 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O" } */ -/* { dg-options "-O -mtune=i686" { target i?86-*-* } } */ +/* { dg-options "-O -mtune=i686" { target { i?86-*-* && ilp32 } } } */ /* { dg-options "-O -m32 -mtune=i686" { target x86_64-*-* } } */ extern void abort(void); diff --git a/gcc/testsuite/gcc.dg/short-compare-2.c b/gcc/testsuite/gcc.dg/short-compare-2.c index 1c5963c5a2f..736e1510e8d 100644 --- a/gcc/testsuite/gcc.dg/short-compare-2.c +++ b/gcc/testsuite/gcc.dg/short-compare-2.c @@ -4,7 +4,7 @@ /* { dg-do run } */ /* { dg-options "-O" } */ -/* { dg-options "-O -mtune=i686" { target i?86-*-* } } */ +/* { dg-options "-O -mtune=i686" { target { i?86-*-* && ilp32 } } } */ /* { dg-options "-O -m32 -mtune=i686" { target x86_64-*-* } } */ extern void abort(); diff --git a/gcc/testsuite/gcc.dg/smod-1.c b/gcc/testsuite/gcc.dg/smod-1.c index 268b43bd2ab..e75978af595 100644 --- a/gcc/testsuite/gcc.dg/smod-1.c +++ b/gcc/testsuite/gcc.dg/smod-1.c @@ -3,7 +3,7 @@ /* { dg-do run } */ /* { dg-options "-std=c99" } */ -/* { dg-options "-std=c99 -mtune=i486" { target i?86-*-* } } */ +/* { dg-options "-std=c99 -mtune=i486" { target { i?86-*-* && ilp32 } } } */ #include <limits.h> diff --git a/gcc/testsuite/gcc.dg/sparc-reg-1.c b/gcc/testsuite/gcc.dg/sparc-reg-1.c new file mode 100644 index 00000000000..860094299a1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/sparc-reg-1.c @@ -0,0 +1,11 @@ +/* PR middle-end/20263 */ + +/* { dg-do assemble { target sparc64-*-* } } */ +/* { dg-options "" } */ + +register void *tp __asm__("%g7"); + +void set_tp(void) +{ + tp = 0; +} diff --git a/gcc/testsuite/gcc.dg/stmt-expr-label-1.c b/gcc/testsuite/gcc.dg/stmt-expr-label-1.c new file mode 100644 index 00000000000..1f52a313918 --- /dev/null +++ b/gcc/testsuite/gcc.dg/stmt-expr-label-1.c @@ -0,0 +1,404 @@ +/* Test for labels in statement expressions: bugs 772 and 17913. + goto statements must not jump into statement expressions. + + This tests all combinations of label and goto locations in a given + function. Each combination is tested twice, once with just that + label and goto and once with many others in order to exercise the + different code paths involved with excess labels. */ + +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +void f0 (void) { goto a; a:({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa0 (void) { p0A:goto p0A; goto a; a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f1 (void) { goto a; ({ a:({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa1 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f2 (void) { goto a; ({ ({a:0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa2 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f3 (void) { goto a; ({ ({0;}); a:({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa3 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f4 (void) { goto a; ({ ({0;}); ({a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa4 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f5 (void) { goto a; ({ ({0;}); ({0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa5 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f6 (void) { goto a; ({ ({0;}); ({0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); 0; } +void fa6 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f7 (void) { goto a; ({ ({0;}); ({0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa7 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f8 (void) { goto a; ({ ({0;}); ({0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa8 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f9 (void) { goto a; ({ ({0;}); ({0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa9 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f10 (void) { goto a; ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa10 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f11 (void) { goto a; ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa11 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f12 (void) { goto a; ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a:0; } +void fa12 (void) { p0A:goto p0A; goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f13 (void) { a: goto a; ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa13 (void) { a: goto a; P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f14 (void) { a:({ goto a; ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa14 (void) { a:({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f15 (void) { ({ goto a; a:({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa15 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f16 (void) { ({ goto a; ({a:0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa16 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f17 (void) { ({ goto a; ({0;}); a:({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa17 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f18 (void) { ({ goto a; ({0;}); ({a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa18 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f19 (void) { ({ goto a; ({0;}); ({0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa19 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f20 (void) { ({ goto a; ({0;}); ({0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); 0; } +void fa20 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f21 (void) { ({ goto a; ({0;}); ({0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa21 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f22 (void) { ({ goto a; ({0;}); ({0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa22 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f23 (void) { ({ goto a; ({0;}); ({0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa23 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f24 (void) { ({ goto a; ({0;}); ({0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa24 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f25 (void) { ({ goto a; ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa25 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f26 (void) { ({ goto a; ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a:0; } +void fa26 (void) { P0A:goto P0A;({ p01A:goto p01A; goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f27 (void) { ({ a: goto a; ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa27 (void) { P0A:goto P0A;({ a: goto a; P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f28 (void) { a:({ ({ goto a; 0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa28 (void) { a:({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f29 (void) { ({ a:({ goto a; 0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa29 (void) { P0A:goto P0A;({ a:({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f30 (void) { ({ ({ goto a; a:0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa30 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f31 (void) { ({ ({ goto a; 0;}); a:({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa31 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f32 (void) { ({ ({ goto a; 0;}); ({a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa32 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f33 (void) { ({ ({ goto a; 0;}); ({0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa33 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f34 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); 0; } +void fa34 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f35 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa35 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f36 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa36 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f37 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa37 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f38 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa38 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f39 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa39 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f40 (void) { ({ ({ goto a; 0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a:0; } +void fa40 (void) { P0A:goto P0A;({ P01A:goto P01A;({p012A:goto p012A; goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f41 (void) { ({ ({a: goto a; 0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa41 (void) { P0A:goto P0A;({ P01A:goto P01A;({a: goto a; P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f42 (void) { a:({ ({0;}); goto a; ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa42 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f43 (void) { ({ a:({0;}); goto a; ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa43 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f44 (void) { ({ ({a:0;}); goto a; ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa44 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f45 (void) { ({ ({0;}); goto a; a:({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa45 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f46 (void) { ({ ({0;}); goto a; ({a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa46 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f47 (void) { ({ ({0;}); goto a; ({0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa47 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f48 (void) { ({ ({0;}); goto a; ({0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); 0; } +void fa48 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f49 (void) { ({ ({0;}); goto a; ({0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa49 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f50 (void) { ({ ({0;}); goto a; ({0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa50 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f51 (void) { ({ ({0;}); goto a; ({0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa51 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f52 (void) { ({ ({0;}); goto a; ({0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa52 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f53 (void) { ({ ({0;}); goto a; ({0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa53 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f54 (void) { ({ ({0;}); goto a; ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a:0; } +void fa54 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); p01B:goto p01B; goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f55 (void) { ({ ({0;}); a: goto a; ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa55 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a: goto a; P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f56 (void) { a:({ ({0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa56 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f57 (void) { ({ a:({0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa57 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f58 (void) { ({ ({a:0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa58 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f59 (void) { ({ ({0;}); a:({ goto a; 0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa59 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f60 (void) { ({ ({0;}); ({ goto a; a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa60 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f61 (void) { ({ ({0;}); ({ goto a; 0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa61 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f62 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); 0; } +void fa62 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f63 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa63 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f64 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa64 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f65 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa65 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f66 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa66 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f67 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa67 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f68 (void) { ({ ({0;}); ({ goto a; 0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a:0; } +void fa68 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({p013A:goto p013A; goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f69 (void) { ({ ({0;}); ({a: goto a; 0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa69 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a: goto a; P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f70 (void) { a:({ ({0;}); ({0;}); goto a; 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa70 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f71 (void) { ({ a:({0;}); ({0;}); goto a; 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa71 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f72 (void) { ({ ({a:0;}); ({0;}); goto a; 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa72 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f73 (void) { ({ ({0;}); a:({0;}); goto a; 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa73 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f74 (void) { ({ ({0;}); ({a:0;}); goto a; 0;}); ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa74 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f75 (void) { ({ ({0;}); ({0;}); goto a; a:0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa75 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f76 (void) { ({ ({0;}); ({0;}); goto a; 0;}); a:({ ({0;}); ({0;}); 0;}); 0; } +void fa76 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f77 (void) { ({ ({0;}); ({0;}); goto a; 0;}); ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa77 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f78 (void) { ({ ({0;}); ({0;}); goto a; 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa78 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f79 (void) { ({ ({0;}); ({0;}); goto a; 0;}); ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa79 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f80 (void) { ({ ({0;}); ({0;}); goto a; 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa80 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f81 (void) { ({ ({0;}); ({0;}); goto a; 0;}); ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa81 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f82 (void) { ({ ({0;}); ({0;}); goto a; 0;}); ({ ({0;}); ({0;}); 0;}); a:0; } +void fa82 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); p01C:goto p01C; goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f83 (void) { ({ ({0;}); ({0;}); a: goto a; 0;}); ({ ({0;}); ({0;}); 0;}); 0; } +void fa83 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a: goto a; P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f84 (void) { a:({ ({0;}); ({0;}); 0;}); goto a; ({ ({0;}); ({0;}); 0;}); 0; } +void fa84 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f85 (void) { ({ a:({0;}); ({0;}); 0;}); goto a; ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa85 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f86 (void) { ({ ({a:0;}); ({0;}); 0;}); goto a; ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa86 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f87 (void) { ({ ({0;}); a:({0;}); 0;}); goto a; ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa87 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f88 (void) { ({ ({0;}); ({a:0;}); 0;}); goto a; ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa88 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f89 (void) { ({ ({0;}); ({0;}); a:0;}); goto a; ({ ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa89 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f90 (void) { ({ ({0;}); ({0;}); 0;}); goto a; a:({ ({0;}); ({0;}); 0;}); 0; } +void fa90 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f91 (void) { ({ ({0;}); ({0;}); 0;}); goto a; ({ a:({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa91 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f92 (void) { ({ ({0;}); ({0;}); 0;}); goto a; ({ ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa92 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f93 (void) { ({ ({0;}); ({0;}); 0;}); goto a; ({ ({0;}); a:({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa93 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f94 (void) { ({ ({0;}); ({0;}); 0;}); goto a; ({ ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa94 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f95 (void) { ({ ({0;}); ({0;}); 0;}); goto a; ({ ({0;}); ({0;}); a:0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa95 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f96 (void) { ({ ({0;}); ({0;}); 0;}); goto a; ({ ({0;}); ({0;}); 0;}); a:0; } +void fa96 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); p0B:goto p0B; goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f97 (void) { ({ ({0;}); ({0;}); 0;}); a: goto a; ({ ({0;}); ({0;}); 0;}); 0; } +void fa97 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a: goto a; P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f98 (void) { a:({ ({0;}); ({0;}); 0;}); ({ goto a; ({0;}); ({0;}); 0;}); 0; } +void fa98 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f99 (void) { ({ a:({0;}); ({0;}); 0;}); ({ goto a; ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa99 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f100 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ goto a; ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa100 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f101 (void) { ({ ({0;}); a:({0;}); 0;}); ({ goto a; ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa101 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f102 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ goto a; ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa102 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f103 (void) { ({ ({0;}); ({0;}); a:0;}); ({ goto a; ({0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa103 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f104 (void) { ({ ({0;}); ({0;}); 0;}); a:({ goto a; ({0;}); ({0;}); 0;}); 0; } +void fa104 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f105 (void) { ({ ({0;}); ({0;}); 0;}); ({ goto a; a:({0;}); ({0;}); 0;}); 0; } +void fa105 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f106 (void) { ({ ({0;}); ({0;}); 0;}); ({ goto a; ({a:0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa106 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f107 (void) { ({ ({0;}); ({0;}); 0;}); ({ goto a; ({0;}); a:({0;}); 0;}); 0; } +void fa107 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f108 (void) { ({ ({0;}); ({0;}); 0;}); ({ goto a; ({0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa108 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f109 (void) { ({ ({0;}); ({0;}); 0;}); ({ goto a; ({0;}); ({0;}); a:0;}); 0; } +void fa109 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f110 (void) { ({ ({0;}); ({0;}); 0;}); ({ goto a; ({0;}); ({0;}); 0;}); a:0; } +void fa110 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ p02A:goto p02A; goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f111 (void) { ({ ({0;}); ({0;}); 0;}); ({ a: goto a; ({0;}); ({0;}); 0;}); 0; } +void fa111 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a: goto a; P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f112 (void) { a:({ ({0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); 0; } +void fa112 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f113 (void) { ({ a:({0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa113 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f114 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa114 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f115 (void) { ({ ({0;}); a:({0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa115 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f116 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa116 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f117 (void) { ({ ({0;}); ({0;}); a:0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa117 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f118 (void) { ({ ({0;}); ({0;}); 0;}); a:({ ({ goto a; 0;}); ({0;}); 0;}); 0; } +void fa118 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f119 (void) { ({ ({0;}); ({0;}); 0;}); ({ a:({ goto a; 0;}); ({0;}); 0;}); 0; } +void fa119 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f120 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({ goto a; a:0;}); ({0;}); 0;}); 0; } +void fa120 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f121 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); a:({0;}); 0;}); 0; } +void fa121 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f122 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa122 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f123 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); a:0;}); 0; } +void fa123 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f124 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({ goto a; 0;}); ({0;}); 0;}); a:0; } +void fa124 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({p024A:goto p024A; goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f125 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({a: goto a; 0;}); ({0;}); 0;}); 0; } +void fa125 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a: goto a; P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f126 (void) { a:({ ({0;}); ({0;}); 0;}); ({ ({0;}); goto a; ({0;}); 0;}); 0; } +void fa126 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f127 (void) { ({ a:({0;}); ({0;}); 0;}); ({ ({0;}); goto a; ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa127 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f128 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ ({0;}); goto a; ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa128 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f129 (void) { ({ ({0;}); a:({0;}); 0;}); ({ ({0;}); goto a; ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa129 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f130 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ ({0;}); goto a; ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa130 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f131 (void) { ({ ({0;}); ({0;}); a:0;}); ({ ({0;}); goto a; ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa131 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f132 (void) { ({ ({0;}); ({0;}); 0;}); a:({ ({0;}); goto a; ({0;}); 0;}); 0; } +void fa132 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f133 (void) { ({ ({0;}); ({0;}); 0;}); ({ a:({0;}); goto a; ({0;}); 0;}); 0; } +void fa133 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f134 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({a:0;}); goto a; ({0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa134 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f135 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); goto a; a:({0;}); 0;}); 0; } +void fa135 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f136 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); goto a; ({a:0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa136 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f137 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); goto a; ({0;}); a:0;}); 0; } +void fa137 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f138 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); goto a; ({0;}); 0;}); a:0; } +void fa138 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); p02B:goto p02B; goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f139 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); a: goto a; ({0;}); 0;}); 0; } +void fa139 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a: goto a; P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f140 (void) { a:({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); 0; } +void fa140 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f141 (void) { ({ a:({0;}); ({0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa141 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f142 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa142 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f143 (void) { ({ ({0;}); a:({0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa143 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f144 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa144 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f145 (void) { ({ ({0;}); ({0;}); a:0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa145 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f146 (void) { ({ ({0;}); ({0;}); 0;}); a:({ ({0;}); ({ goto a; 0;}); 0;}); 0; } +void fa146 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f147 (void) { ({ ({0;}); ({0;}); 0;}); ({ a:({0;}); ({ goto a; 0;}); 0;}); 0; } +void fa147 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f148 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({a:0;}); ({ goto a; 0;}); 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa148 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f149 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); a:({ goto a; 0;}); 0;}); 0; } +void fa149 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f150 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({ goto a; a:0;}); 0;}); 0; } +void fa150 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f151 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); a:0;}); 0; } +void fa151 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f152 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({ goto a; 0;}); 0;}); a:0; } +void fa152 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({p025A:goto p025A; goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f153 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({a: goto a; 0;}); 0;}); 0; } +void fa153 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a: goto a; P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f154 (void) { a:({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); goto a; 0;}); 0; } +void fa154 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f155 (void) { ({ a:({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa155 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f156 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa156 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f157 (void) { ({ ({0;}); a:({0;}); 0;}); ({ ({0;}); ({0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa157 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f158 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ ({0;}); ({0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa158 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f159 (void) { ({ ({0;}); ({0;}); a:0;}); ({ ({0;}); ({0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa159 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f160 (void) { ({ ({0;}); ({0;}); 0;}); a:({ ({0;}); ({0;}); goto a; 0;}); 0; } +void fa160 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f161 (void) { ({ ({0;}); ({0;}); 0;}); ({ a:({0;}); ({0;}); goto a; 0;}); 0; } +void fa161 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f162 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({a:0;}); ({0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa162 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f163 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); a:({0;}); goto a; 0;}); 0; } +void fa163 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f164 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({a:0;}); goto a; 0;}); 0; } /* { dg-error "error: jump into statement expression" } */ +void fa164 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f165 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); goto a; a:0;}); 0; } +void fa165 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; a:0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f166 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); goto a; 0;}); a:0; } +void fa166 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); p02C:goto p02C; goto a; P02C:goto P02C;0;}); a:0;P0D:goto P0D; } +void f167 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); a: goto a; 0;}); 0; } +void fa167 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a: goto a; P02C:goto P02C;0;}); P0C:goto P0C;0;P0D:goto P0D; } +void f168 (void) { a:({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); goto a; 0; } +void fa168 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } +void f169 (void) { ({ a:({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa169 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f170 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa170 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f171 (void) { ({ ({0;}); a:({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa171 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f172 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa172 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f173 (void) { ({ ({0;}); ({0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa173 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f174 (void) { ({ ({0;}); ({0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); goto a; 0; } +void fa174 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } +void f175 (void) { ({ ({0;}); ({0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa175 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f176 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa176 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f177 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa177 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f178 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa178 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f179 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); goto a; 0; } /* { dg-error "error: jump into statement expression" } */ +void fa179 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); p0C:goto p0C; goto a; P0C:goto P0C;0;P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f180 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); goto a; a:0; } +void fa180 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); p0C:goto p0C; goto a; a:0;P0D:goto P0D; } +void f181 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a: goto a; 0; } +void fa181 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a: goto a; P0C:goto P0C;0;P0D:goto P0D; } +void f182 (void) { a:({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; goto a; } +void fa182 (void) { a:({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } +void f183 (void) { ({ a:({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa183 (void) { P0A:goto P0A;({ a:({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f184 (void) { ({ ({a:0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa184 (void) { P0A:goto P0A;({ P01A:goto P01A;({a:0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f185 (void) { ({ ({0;}); a:({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa185 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); a:({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f186 (void) { ({ ({0;}); ({a:0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa186 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({a:0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f187 (void) { ({ ({0;}); ({0;}); a:0;}); ({ ({0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa187 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); a:0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f188 (void) { ({ ({0;}); ({0;}); 0;}); a:({ ({0;}); ({0;}); 0;}); 0; goto a; } +void fa188 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); a:({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } +void f189 (void) { ({ ({0;}); ({0;}); 0;}); ({ a:({0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa189 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ a:({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f190 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({a:0;}); ({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa190 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({a:0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f191 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); a:({0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa191 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); a:({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f192 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({a:0;}); 0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa192 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({a:0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f193 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); a:0;}); 0; goto a; } /* { dg-error "error: jump into statement expression" } */ +void fa193 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); a:0;}); P0C:goto P0C;0;p0D:goto p0D; goto a; P0D:goto P0D; } /* { dg-error "error: jump into statement expression" } */ +void f194 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); a:0; goto a; } +void fa194 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); a:0;p0D:goto p0D; goto a; P0D:goto P0D; } +void f195 (void) { ({ ({0;}); ({0;}); 0;}); ({ ({0;}); ({0;}); 0;}); 0;a: goto a; } +void fa195 (void) { P0A:goto P0A;({ P01A:goto P01A;({P012A:goto P012A;0;}); P01B:goto P01B;({P013A:goto P013A;0;}); P01C:goto P01C;0;}); P0B:goto P0B;({ P02A:goto P02A;({P024A:goto P024A;0;}); P02B:goto P02B;({P025A:goto P025A;0;}); P02C:goto P02C;0;}); P0C:goto P0C;0;a: goto a; P0D:goto P0D; } diff --git a/gcc/testsuite/gcc.dg/stmt-expr-label-2.c b/gcc/testsuite/gcc.dg/stmt-expr-label-2.c new file mode 100644 index 00000000000..863d610545c --- /dev/null +++ b/gcc/testsuite/gcc.dg/stmt-expr-label-2.c @@ -0,0 +1,27 @@ +/* Test for labels in statement expressions: bugs 772 and 17913. + switch statements must not jump into statement expressions. */ + +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +void +f (int a) +{ + switch (a) + { + case 0: + case 1: + ({ + case 2: /* { dg-error "error: case label in statement expression not containing enclosing switch statement" } */ + default: /* { dg-error "error: 'default' label in statement expression not containing enclosing switch statement" } */ + switch (a) + { + case 3: + default: + ; + } + 0; + }); + } +} diff --git a/gcc/testsuite/gcc.dg/stmt-expr-label-3.c b/gcc/testsuite/gcc.dg/stmt-expr-label-3.c new file mode 100644 index 00000000000..09258069522 --- /dev/null +++ b/gcc/testsuite/gcc.dg/stmt-expr-label-3.c @@ -0,0 +1,8 @@ +/* Test for labels in statement expressions: bugs 772 and 17913. + Test the particular case of bug 17913. */ + +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void f(void) { 1 ? 1 : ({ a : 1; 1; }); goto a; } /* { dg-error "error: jump into statement expression" } */ diff --git a/gcc/testsuite/gcc.dg/titype-1.c b/gcc/testsuite/gcc.dg/titype-1.c index d9f9da90756..1d0c570dafa 100644 --- a/gcc/testsuite/gcc.dg/titype-1.c +++ b/gcc/testsuite/gcc.dg/titype-1.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* Not all platforms support TImode integers. */ -#if defined(__LP64__) +#if defined(__LP64__) && !defined(__hppa__) typedef int TItype __attribute__ ((mode (TI))); #else typedef long TItype; diff --git a/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c b/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c new file mode 100644 index 00000000000..2a539208529 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c @@ -0,0 +1,14 @@ +/* PR middle-end/20491 */ + +/* { dg-do compile } */ + +/* Combine used to introduce invalid subregs for the asm input, and + we'd crash later on, when removing all subregs. */ + +volatile unsigned short _const_32 [4] = {1,2,3,4}; +void +evas_common_convert_yuv_420p_601_rgba() +{ + __asm__ __volatile__ ("" : : "X" (*_const_32)); +} + diff --git a/gcc/testsuite/gcc.dg/torture/badshift.c b/gcc/testsuite/gcc.dg/torture/badshift.c new file mode 100644 index 00000000000..dec71cfa2d1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/badshift.c @@ -0,0 +1,29 @@ +/* PR rtl-optimization/20532 */ + +/* { dg-do run } */ +/* { dg-options "" } */ +/* { dg-options "-march=i386" { target { i?86-*-* && ilp32 } } } */ + +/* We used to optimize the DImode shift-by-32 to zero because in combine + we turned: + + (v << 31) + (v << 31) + + into: + + (v * (((HOST_WIDE_INT)1 << 31) + ((HOST_WIDE_INT)1 << 31))) + + With a 32-bit HOST_WIDE_INT, the coefficient overflowed to zero. */ + +unsigned long long int badshift(unsigned long long int v) +{ + return v << 31 << 1; +} + +extern void abort (); + +int main() { + if (badshift (1) == 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c b/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c index b8b970e5cb9..d3e97701f2b 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c @@ -2,6 +2,7 @@ /* Origin: Joseph Myers <jsm28@cam.ac.uk> */ /* { dg-options "-multiply_defined suppress" { target powerpc-*-darwin* } } */ /* { dg-do link } */ +/* { dg-require-weak "" } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c b/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c index c8c8609f62c..1103e3d8120 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c @@ -3,6 +3,7 @@ <zack@codesourcery.com>. */ /* { dg-options "-multiply_defined suppress" { target powerpc-*-darwin* } } */ /* { dg-do link } */ +/* { dg-require-weak "" } */ extern void tabort (void); extern void texit (void); diff --git a/gcc/testsuite/gcc.dg/torture/pr19683-1.c b/gcc/testsuite/gcc.dg/torture/pr19683-1.c new file mode 100644 index 00000000000..4015fb981e9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr19683-1.c @@ -0,0 +1,42 @@ +/* From PR rtl-optimization/19683. On little-endian MIPS targets, + reload would incorrectly inherit the high part of the multiplication + result. */ +/* { dg-do run { target mips*-*-* } } */ + +extern void abort (void); +extern void exit (int); + +#define REPEAT10(X, Y) \ + X(Y##0); X(Y##1); X(Y##2); X(Y##3); X(Y##4); \ + X(Y##5); X(Y##6); X(Y##7); X(Y##8); X(Y##9) + +#define REPEAT30(X) REPEAT10 (X, 0); REPEAT10 (X, 1); REPEAT10 (X, 2) +#define IN(X) unsigned int x##X = ptr[0] +#define OUT(X) ptr[0] = x##X + +union u { unsigned long long ll; unsigned int i[2]; }; + +unsigned int +foo (volatile unsigned int *ptr) +{ + union u u; + int result; + + u.ll = (unsigned long long) ptr[0] * ptr[0]; + REPEAT30 (IN); + REPEAT30 (OUT); + asm ("#" : "=l" (result) : "l" (u.i[1])); + return result; +} + +int +main (void) +{ + unsigned int array[] = { 1000 * 1000 * 1000 }; + union u u; + + u.ll = (unsigned long long) array[0] * array[0]; + if (foo (array) != u.i[1]) + abort (); + exit (0); +} diff --git a/gcc/testsuite/gcc.dg/torture/pr20314-1.c b/gcc/testsuite/gcc.dg/torture/pr20314-1.c new file mode 100644 index 00000000000..8a69c2dcaf5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr20314-1.c @@ -0,0 +1,56 @@ +/* PR inline-asm/20314 */ +/* { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* ia64-*-* } } */ + +int +f1 (void) +{ + int x = 4, y; + __asm__ volatile ("" : "+r,r" (x), "=r,r" (y) + : "%r,r" (x), "m,r" (8), "r,r" (2)); + return x; +} + +int +f2 (void) +{ + int x = 4, y; + __asm__ volatile ("" : "=r,r" (x), "=r,r" (y) + : "%0,0" (x), "m,r" (8), "r,r" (2)); + return x; +} + +int +f3 (void) +{ + int x = 4, y; + __asm__ volatile ("" : "+r,r" (x), "=r,r" (y) + : "%m,r" (8), "r,r" (2)); + return x; +} + +int +f4 (void) +{ + int x = 4, y; + __asm__ volatile ("" : "+r" (x), "=r" (y) + : "r" (x), "r" (8), "r" (2)); + return x; +} + +int +f5 (void) +{ + int x = 4, y; + __asm__ volatile ("" : "=r" (x), "=r" (y) + : "0" (x), "r" (8), "r" (2)); + return x; +} + +int +f6 (void) +{ + int x = 4, y; + __asm__ volatile ("" : "+r" (x), "=r" (y) + : "r" (8), "r" (2)); + return x; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr20314-2.c b/gcc/testsuite/gcc.dg/torture/pr20314-2.c new file mode 100644 index 00000000000..ad1b8f9724a --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr20314-2.c @@ -0,0 +1,47 @@ +/* PR inline-asm/20314 */ +/* { dg-do compile { target { x86_64-*-* && lp64 } } } */ +/* { dg-do compile { target ia64-*-* powerpc*-*-* } } */ + +int a, b, c, d, e, f, g, h, i, j, k, l; + +void +f1 (void) +{ + __asm__ volatile ("" + : [a] "+r" (a), [b] "+r" (b), [c] "+r" (c), [d] "+r" (d), + [e] "+r" (e), [f] "+r" (f), [g] "+r" (g), [h] "+r" (h), + [i] "+r" (i), [j] "+r" (j), [k] "+r" (k), [l] "+r" (l)); +} + +void +f2 (void) +{ + __asm__ volatile ("" + : [a] "+r,m" (a), [b] "+r,m" (b), [c] "+r,m" (c), [d] "+r,m" (d), + [e] "+r,m" (e), [f] "+r,m" (f), [g] "+r,m" (g), [h] "+r,m" (h), + [i] "+r,m" (i), [j] "+r,m" (j), [k] "+r,m" (k), [l] "+r,m" (l)); +} + +void +f3 (void) +{ + __asm__ volatile ("" + : [a] "=r" (a), [b] "=r" (b), [c] "=r" (c), [d] "=r" (d), + [e] "=r" (e), [f] "=r" (f), [g] "=r" (g), [h] "=r" (h), + [i] "=r" (i), [j] "=r" (j), [k] "=r" (k), [l] "=r" (l) + : "[a]" (a), "[b]" (b), "[c]" (c), "[d]" (d), + "[e]" (e), "[f]" (f), "[g]" (g), "[h]" (h), + "[i]" (i), "[j]" (j), "[k]" (k), "[l]" (l)); +} + +void +f4 (void) +{ + __asm__ volatile ("" + : [a] "=r,m" (a), [b] "=r,m" (b), [c] "=r,m" (c), [d] "=r,m" (d), + [e] "=r,m" (e), [f] "=r,m" (f), [g] "=r,m" (g), [h] "=r,m" (h), + [i] "=r,m" (i), [j] "=r,m" (j), [k] "=r,m" (k), [l] "=r,m" (l) + : "[a],m" (a), "[b],m" (b), "[c],m" (c), "[d],m" (d), + "[e],m" (e), "[f],m" (f), "[g],m" (g), "[h],m" (h), + "[i],m" (i), "[j],m" (j), "[k],m" (k), "[l],m" (l)); +} diff --git a/gcc/testsuite/gcc.dg/torture/tree-loop-1.c b/gcc/testsuite/gcc.dg/torture/tree-loop-1.c new file mode 100644 index 00000000000..1d38691780a --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/tree-loop-1.c @@ -0,0 +1,21 @@ +/* PR tree-optimization/20640 */ + +/* After unrolling the loop, we'd turn some conditional branches into + unconditional ones, but branch redirection would fail to compute + the PHI args for the PHI nodes in the replacement edge + destination, so they'd remain NULL causing crashes later on. */ + +/* { dg-do compile } */ + +static int a = 0; +extern int foo (void); +extern int *bar (void) __attribute__ ((__const__)); + +void +test (int x) +{ + int b = 10; + while (foo () == -1 && *bar () == 4 && b > 0) + --b; + a = x; +} diff --git a/gcc/testsuite/gcc.dg/transparent-union-1.c b/gcc/testsuite/gcc.dg/transparent-union-1.c new file mode 100644 index 00000000000..a5be8ce9186 --- /dev/null +++ b/gcc/testsuite/gcc.dg/transparent-union-1.c @@ -0,0 +1,83 @@ +/* PR c/20043 */ +/* { dg-compile } */ +/* { dg-options "-std=gnu99" } */ + +extern void f0 (int *); +extern void f0 (int *__restrict); + +extern void f1 (int *__restrict); +extern void f1 (int *); + +typedef union { int *i; long *l; } U2 + __attribute__((transparent_union)); +extern void f2 (U2); +extern void f2 (int *); + +typedef union { int *__restrict i; long *__restrict l; } U3 + __attribute__((transparent_union)); +extern void f3 (U3); +extern void f3 (int *__restrict); + +extern void f4 (U3); +extern void f4 (int *); + +extern void f5 (U2); +extern void f5 (int *__restrict); + +typedef union { long *l; int *i; } U6 + __attribute__((transparent_union)); +extern void f6 (U6); +extern void f6 (int *); + +typedef union { long *__restrict l; int *__restrict i; } U7 + __attribute__((transparent_union)); +extern void f7 (U7); +extern void f7 (int *__restrict); + +extern void f8 (U7); +extern void f8 (int *); + +extern void f9 (U6); +extern void f9 (int *__restrict); + +extern void f10 (U2); +extern void f11 (U3); +extern void f12 (U6); +extern void f13 (U7); + +int i; +long l; + +int +main (void) +{ + f0 (&i); + f0 (&l); /* { dg-warning "warning: passing argument 1 of 'f0' from incompatible pointer type" } */ + f1 (&i); + f1 (&l); /* { dg-warning "warning: passing argument 1 of 'f1' from incompatible pointer type" } */ + f2 (&i); + f2 (&l); /* { dg-warning "warning: passing argument 1 of 'f2' from incompatible pointer type" } */ + f3 (&i); + f3 (&l); /* { dg-warning "warning: passing argument 1 of 'f3' from incompatible pointer type" } */ + f4 (&i); + f4 (&l); /* { dg-warning "warning: passing argument 1 of 'f4' from incompatible pointer type" } */ + f5 (&i); + f5 (&l); /* { dg-warning "warning: passing argument 1 of 'f5' from incompatible pointer type" } */ + f6 (&i); + f6 (&l); /* { dg-warning "warning: passing argument 1 of 'f6' from incompatible pointer type" } */ + f7 (&i); + f7 (&l); /* { dg-warning "warning: passing argument 1 of 'f7' from incompatible pointer type" } */ + f8 (&i); + f8 (&l); /* { dg-warning "warning: passing argument 1 of 'f8' from incompatible pointer type" } */ + f9 (&i); + f9 (&l); /* { dg-warning "warning: passing argument 1 of 'f9' from incompatible pointer type" } */ + f10 (&i); + f10 (&l); + f11 (&i); + f11 (&l); + f12 (&i); + f12 (&l); + f13 (&i); + f13 (&l); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/transparent-union-2.c b/gcc/testsuite/gcc.dg/transparent-union-2.c new file mode 100644 index 00000000000..f466c4aa2be --- /dev/null +++ b/gcc/testsuite/gcc.dg/transparent-union-2.c @@ -0,0 +1,18 @@ +/* PR c/20043 */ +/* { dg-compile } */ +/* { dg-options "-std=gnu99" } */ + +typedef union { int *i; long *l; } U + __attribute__((transparent_union)); + +extern void f0 (U); /* { dg-error "previous declaration" } */ +extern void f0 (void *); /* { dg-error "conflicting types" } */ + +extern void f1 (U); /* { dg-error "previous declaration" } */ +extern void f1 (unsigned long); /* { dg-error "conflicting types" } */ + +extern void f2 (void *); /* { dg-error "previous declaration" } */ +extern void f2 (U); /* { dg-error "conflicting types" } */ + +extern void f3 (unsigned long); /* { dg-error "previous declaration" } */ +extern void f3 (U); /* { dg-error "conflicting types" } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/20040216-1.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/20040216-1.c new file mode 100644 index 00000000000..1d1784e011b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/20040216-1.c @@ -0,0 +1,27 @@ +/* APPLE LOCAL file lno */ +/* Test dependence graph. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -floop-test -c -fdump-tree-all" } */ + +#define N 16 +void bar(int *); +void foo() +{ + int i,j; + int A[N]; + int X[N]; + int Y[N]; + int Z[N]; + + for (i=2; i<9; i++) + { + X[i] = Y[i] + Z[i]; + A[i] = X[i-1] + 1; + } + + bar (A); +} + +/* Find 4 Dependence nodes */ +/* { dg-final { scan-tree-dump-times "Dependence Node" 4 "lptest"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-01.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-01.c new file mode 100644 index 00000000000..b7ac0083fb4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-01.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int main(void) +{ + unsigned a; + int b; + int c; + + /* loop_1 runs exactly 4 times. */ + for (a = 22; a < 50; a+=1) + { + /* loop_2 runs exactly 6 times. On exit, the variable B is equal to 53. */ + for (b = 23; b < 50; b+=5) + { + ++a; + + /* loop_3 runs {{77, +, -7}_1, +, -1}_2 times. */ + for (c = a; c < 100; c++) + { + + } + } + } +} + +/* The analyzer has to detect the following evolution functions: + b -> {23, +, 5}_2 + a -> {{22, +, 7}_1, +, 1}_2 + c -> {{{23, +, 7}_1, +, 1}_2, +, 1}_3 +*/ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 4" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 6" 1 "lptest"} } */ + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-02.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-02.c new file mode 100644 index 00000000000..2dce3aa1aa6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-02.c @@ -0,0 +1,29 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int main(void) +{ + int a; + int b; + int *c; + + /* The following loop runs exactly 3 times. */ + for (a = 11; a < 50; a++) + { + /* The following loop runs exactly 9 times. */ + for (b = 8; b < 50; b+=5) + { + c[a + 5] = 5; + c[b] = 6; + a+=2; + } + } +} + +/* The analyzer has to detect the following evolution functions: + b -> {8, +, 5}_2 + a -> {{11, +, 19}_1, +, 2}_2 +*/ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 3" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 9" 1 "lptest"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-03.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-03.c new file mode 100644 index 00000000000..be137f8e1c2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-03.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main(void) +{ + int a; + int b; + int *c; + + /* loop_1 runs exactly 5 times. */ + for (a = 11; a < 50; a++) + { + /* loop_2 runs exactly 7 times. */ + for (b = 8; b < 50; b+=5) + { + c[a++] = 5; + c[b++] = 6; + } + } +} + +/* The analyzer has to detect the following evolution functions: + b -> {8, +, 6}_2 + a -> {{11, +, 8}_1, +, 1}_2 +*/ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 5" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 7" 1 "lptest"} } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-04.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-04.c new file mode 100644 index 00000000000..5ab97d19ef9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-04.c @@ -0,0 +1,22 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details -fdump-tree-optimized" } */ + +void remove_me (void); + +int main(void) +{ + int a; + int b = 22; + + /* loop_1 runs exactly 28 times. */ + for (a = 22; a < 50; a++) /* a -> {22, +, 1}_1 */ + { + if (a > b) /* This condition is always false. */ + remove_me (); + b = b + 2; /* b -> {22, +, 2}_1 */ + } +} + +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 28" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-05.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-05.c new file mode 100644 index 00000000000..09df0c89050 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-05.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main(void) +{ + int a; + int b; + int c; + + /* nb_iterations 28 */ + for (a = 22; a < 50; a++) + { + /* nb_iterations 6 */ + for (b = 23; b < 50; b+=5) + { + /* nb_iterations {78, +, -1}_1 */ + for (c = a; c < 100; c++) + { + + } + } + } +} + +/* The analyzer has to detect the following evolution functions: + a -> {22, +, 1}_1 + b -> {23, +, 5}_2 + c -> {{22, +, 1}_1, +, 1}_3 +*/ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 28" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 6" 1 "lptest"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-06.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-06.c new file mode 100644 index 00000000000..3a6a67d0a2b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-06.c @@ -0,0 +1,51 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details -fdump-tree-optimized" } */ + +void remove_me (void); + +int main(void) +{ + int a; + int b; + int c; + + /* loop_1 runs 2 times. */ + for (a = 22; a < 83; a+=1) /* a -> {22, +, 60}_1 */ + { + c = a; + + /* loop_2 runs exactly 6 times. */ + for (b = 23; b < 50; b+=5) /* b -> {23, +, 5}_2 */ + { + ++a; + } + /* The following stmt exercises the value of B on the exit of the loop. + In this case the value of B out of the loop is that of the evolution + function of B applied to the number of iterations the inner loop_2 runs. + Value (B) = {23, +, 5}_2 (6) = 53. */ + + /* At this point, the variable A has the evolution function: + {{22, +, 6}_1, +, 1}_2. */ + if (b != 53 + || a != c + 6) + remove_me (); + + a = a + b; + /* At this point, the variable A has the evolution function: + {{22, +, 59}_1, +, 1}_2. The evolution of the variable B in + the loop_2 does not matter, and is not recorded in the + evolution of A. The above statement is equivalent to: + "a = a + 53", ie. the scalar value of B on exit of the loop_2. */ + + if (a != c + 59) + remove_me (); + + /* And finally the a+=1 from the FOR_STMT produces the evolution + function: {{22, +, 60}_1, +, 1}_2. */ + } +} + +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 2" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 6" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-07.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-07.c new file mode 100644 index 00000000000..2143751f6ac --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-07.c @@ -0,0 +1,28 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-optimized" } */ + +void remove_me (void); + +int main(void) +{ + int a = -100; + int b = 2; + int d = -1; + int e = -100; + + while (a) + { + /* Exercises higher order polynomials. */ + a = a + b; /* a -> {-100, +, {2, +, 3}_1}_1 */ + b = b + 3; /* b -> {2, +, 3}_1 */ + + d = d + 3; /* d -> {-1, +, 3}_1 */ + e = e + d; /* e -> {-100, +, {2, +, 3}_1}_1 */ + + if (a != e) /* a -> {-98, +, {5, +, 3}_1}_1 */ + remove_me (); + } +} + +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-08.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-08.c new file mode 100644 index 00000000000..a0265000b33 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-08.c @@ -0,0 +1,32 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-optimized" } */ + +void remove_me (void); + +int main(void) +{ + int a = -100; + int b = 2; + int c = 3; + int d = -5; + int e = 3; + int f = -100; + + while (a) + { + /* Exercises higher order polynomials. */ + a = a + b; /* a -> {-100, +, 2, +, 3, +, 4}_1 */ + b = b + c; /* b -> {2, +, 3, +, 4}_1 */ + c = c + 4; /* c -> {3, +, 4}_1 */ + + d = d + 4; /* d -> {-5, +, 4}_1 */ + e = e + d; /* e -> {3, +, -1, +, 4}_1 */ + f = f + e; /* f -> {-100, +, 2, +, 3, +, 4}_1 */ + + if (a != f) /* (a == f) -> {-98, +, 5, +, 7, +, 4}_1 */ + remove_me (); + } +} + +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-09.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-09.c new file mode 100644 index 00000000000..406544f3b7d --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-09.c @@ -0,0 +1,42 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int main(void) +{ + int a = -100; + int b = 2; + int c = 3; + int d = 4; + int e = 5; + + while (a) + { + /* Exercises the cycle detector: a -> b -> (c -> d -> e -> c)*. */ + a += b; + b += c; + c += d; + d += e; + e += c; + } +} + +/* This is what is commonly called a "mixer". It whirls the data in a + strongly connected component. We expect the following evolution + functions: + + e -> {5, +, c_13}_1 + d -> {4, +, {5, +, c_13}_1}_1 + c -> {3, +, {4, +, {5, +, c_13}_1}_1}_1 + b -> {2, +, {3, +, {4, +, {5, +, c_13}_1}_1}_1}_1 + a -> {-100, +, {2, +, {3, +, {4, +, {5, +, c_13}_1}_1}_1}_1}_1 +*/ + +/* FIXME: + For the moment this testcase does not test for anything, but for + not ICEing, and for documentation purposes (okay here is the + definition of a mixer). However, I'm considering testing something + around the lines of ssa-chrec-08.c, ie. build two mixers, and then + compare their values. But that is difficult, and low priority. */ + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-10.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-10.c new file mode 100644 index 00000000000..f9c1c516ece --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-10.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +void bar (int); + +int foo (void) +{ + int a; + int x; + int c[100][100]; + + /* loop_1 runs 39 times. */ + for (a = 11; a < 50; a++) + { + /* Array access functions have to be analyzed. */ + x = a + 5; + c[x][a+1] = c[x+2][a+3] + c[x-1][a+2]; + } + bar (c[1][2]); +} + +/* The analyzer has to detect the scalar functions: + a -> {11, +, 1}_1 + x -> {16, +, 1}_1 + x+2 -> {18, +, 1}_1 + x-1 -> {15, +, 1}_1 +*/ + +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 39" 1 "lptest"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-11.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-11.c new file mode 100644 index 00000000000..7e1779f97b4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-11.c @@ -0,0 +1,60 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main(void) +{ + int a = -100; + int b = 2; + + int f = 6; + int g = 7; + int h = 8; + + /* Exercises complex loop exit conditions. + FIXME: This is a strange case where the compiler cc1 and the wrapper gcc + don't produce the same representation: + + (with gcc from command line) + + T.1_9 = f_2 | a_1; + if (T.1_9 == 0) + { + goto <UL47e0>; + } + + versus (with cc1 called from gdb): + + if (f_2 == 0) + { + if (a_1 == 0) + { + goto <ULc7e0>; + } + else + { + (void)0 + } + } + else + { + (void)0 + }; + */ + while (f || a) + { + a += b; + + f += g; + g += h; + } +} + +/* + g -> {7, +, 8}_1 + f -> {6, +, {7, +, 8}_1}_1 + a -> {-100, +, 2}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-12.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-12.c new file mode 100644 index 00000000000..067bfcb2474 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-12.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int a = -100; + int b = 2; + int c = 3; + int d = 4; + + while (a) + { + a = a + b; + + /* Exercises if-phi-nodes. */ + if (bar ()) + b = b + c; + + c = c + d; + } +} + +/* The analyzer has to detect the following evolution functions: + c -> {3, +, 4}_1 + b -> {2, +, {[0, 3], +, [0, 4]}_1}_1 + a -> {-100, +, {2, +, {[0, 3], +, [0, 4]}_1}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-13.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-13.c new file mode 100644 index 00000000000..cb785d020f4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-13.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int foo (void); + +int main (void) +{ + int a = -100; + int b = 2; + int c = 3; + + while (a) + { + /* Exercises if-phi-nodes. */ + if (foo ()) + a += b; + else + a += c; + + b++; + c++; + } +} + +/* The analyzer has to detect the following evolution function: + a -> {-100, +, {[2, 3], +, 1}_1}_1 +*/ + +/* FIXME. */ + + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-14.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-14.c new file mode 100644 index 00000000000..c0258c81aba --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-14.c @@ -0,0 +1,37 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int foo (void); + +int main (void) +{ + int a = -100; + int b = 2; + int c = 3; + int d = 4; + + while (d) + { + if (foo ()) + a += b; + else + a += c; + + b += 1; + c += 5; + + /* Exercises the initial condition of A after the if-phi-node. */ + d = d + a; + } +} + +/* The analyzer has to detect the following evolution function: + b -> {2, +, 1}_1 + c -> {3, +, 5}_1 + a -> {-100, +, {[2, 3], +, [1, 5]}_1}_1 + d -> {4, +, {[-98, -97], +, {[2, 3], +, [1, 5]}_1}_1}_1 +*/ + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-15.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-15.c new file mode 100644 index 00000000000..800866b677b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-15.c @@ -0,0 +1,24 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main (void) +{ + int a; + int b; + int c; + + /* Exercises the MINUS_EXPR. loop_1 runs 50 times. */ + for (a = 100; a > 50; a--) + { + + } +} + +/* The analyzer has to detect the following evolution function: + a -> {100, +, -1}_1 +*/ + +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 50" 1 "lptest"} } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-16.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-16.c new file mode 100644 index 00000000000..a80414abb83 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-16.c @@ -0,0 +1,27 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main (void) +{ + int a = -100; + int b = 2; + int c = 3; + int d = 4; + + /* Determining the number of iterations for the != or == is work in + progress. Same for polynomials of degree >= 2, where we have to + find the zeros of the polynomial. */ + while (d) + { + a += 23; + d = a + d; + } +} + +/* a -> {-100, +, 23}_1 + d -> {4, +, {-77, +, 23}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c new file mode 100644 index 00000000000..1e7ac50e013 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-17.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +void foo () +{ + int a = -100; + int b = 2; + + while (b) + { + if (bar ()) + a += 3; + else + a = 2; + + /* Exercises the case when one of the branches of the if-phi-node is a constant. + FIXME: + - What is the chrec representation of such an evolution? + - Does this kind of code exist in real codes? */ + b += a; + } +} + +/* For the moment the analyzer is expected to output a "don't know" answer, + both for the initial condition and for the evolution part. This is done + in the merge condition branches information. + + a -> [-oo, +oo] + b -> {2, +, a_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-18.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-18.c new file mode 100644 index 00000000000..f72aaa1f542 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-18.c @@ -0,0 +1,32 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo (int x) +{ + int a = -100; + int b = 2; + + while (b) + { + if (x) + a += 3; + else + a += bar (); + + /* Exercises the case when one of the branches of the if-phi-node cannot + be determined: [-oo, +oo]. + Since the evolution function is too difficult to handle in the expanded + form, we have to keep it in its symbolic form: "b -> {2, +, a_1}_1". */ + b += a; + } +} + +/* a -> {-100, +, [min<t, 3>, max<t, 3>]}_1 + b -> {2, +, {[min<t, 3>, max<t, 3>] - 100, +, [min<t, 3>, max<t, 3>]}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-19.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-19.c new file mode 100644 index 00000000000..bb3a5b183ae --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-19.c @@ -0,0 +1,21 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int b = 2; + + while (b) + { + /* Exercises the MULT_EXPR. */ + b = 2*b; + } +} + +/* b -> {2, *, 2}_1 +*/ + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-20.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-20.c new file mode 100644 index 00000000000..e5a24d80a8f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-20.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 3; + int b = 2; + + while (a) + { + b += 5; + a += b; + + /* Exercises the sum of a polynomial of degree 2 with an + evolution of degree 1: + + (loop_num = 1, chrec_var = {3, +, 7, +, 5}, to_add = 2). + The result should be: {3, +, 9, +, 5}. */ + a += 2; + } +} + +/* + b -> {2, +, 5}_1 + a -> {3, +, {9, +, 5}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-21.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-21.c new file mode 100644 index 00000000000..82c5ccb49db --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-21.c @@ -0,0 +1,22 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 3; + int b = 2; + + while (b) + { + a *= 4; + b *= a; + } +} + +/* a -> {3, *, 4}_1 + b -> {{2, *, 12}_1, *, 4}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-22.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-22.c new file mode 100644 index 00000000000..a439099e4df --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-22.c @@ -0,0 +1,24 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 2; + int b = 4; + + while (a) + { + a *= 3; + a *= b; + b *= 5; + } +} + +/* + b -> {4, *, 5}_1 + a -> {2, *, {12, *, 5}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-23.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-23.c new file mode 100644 index 00000000000..c12bc4bf469 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-23.c @@ -0,0 +1,22 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 1; + int b = 1; + + while (a) + { + a *= b; + b += 1; + } +} + +/* a -> {1, *, {1, +, 1}_1}_1 +*/ + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-24.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-24.c new file mode 100644 index 00000000000..96095cd4d4e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-24.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int c; + + /* This exercises the initial condition propagator: + Interval Copy Constant Propagation (ICCP). */ + if (bar ()) + c = 2; + else + c = 3; + + while (c) + { + c += 5; + } +} + +/* + c -> {[2, 3], +, 5}_1 +*/ + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-25.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-25.c new file mode 100644 index 00000000000..43b1dc5bd37 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-25.c @@ -0,0 +1,29 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int c = 7; + + /* This exercises the initial condition propagator: + Interval Copy Constant Propagation (ICCP). */ + if (bar ()) + c = 2; + else + c += 3; + + while (c) + { + c += 5; + } +} + +/* + c -> {[2, 10], +, 5}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-26.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-26.c new file mode 100644 index 00000000000..f7025534118 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-26.c @@ -0,0 +1,26 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int a = -100; + int b = -10; + + /* This exercises a code with two loop nests. */ + + while (a) + a++; + + while (b) + b++; +} + +/* a -> {-100, +, 1}_1 + b -> {-10, +, 1}_2 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-27.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-27.c new file mode 100644 index 00000000000..92c627d324c --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-27.c @@ -0,0 +1,41 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int a = -100; + + /* This exercises a code with two loop nests. */ + + /* loop_1 runs 100 times. */ + while (a < 0) + a++; + + a -= 77; + + /* loop_2 runs 26 times. */ + while (a < 0) + a+=3; +} + +/* The analyzer sees two loop nests: + for the first, it determines the evolution: + a -> {-100, +, 1}_1 + + and for the second, it determines that the first loop ends at 0 and then: + a -> {-77, +, 3}_2 + + When the constant propagation is postponed, the analyzer detects + for the second loop the evolution function: + a -> {a_5, +, 3}_2 + +*/ + +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 100" 1 "lptest"} } */ +/* { dg-final { scan-tree-dump-times "set_nb_iterations_in_loop = 26" 1 "lptest"} } */ + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c new file mode 100644 index 00000000000..a05930fb0df --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-28.c @@ -0,0 +1,40 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int i; + int a = 2; + + while (a) + { + a *= 3; + + for (i = 0; i < 100; i++) + a += 4; + } +} + +/* FIXME: We have to transform the evolution function of "a" into an infinite + sum, a -> {//2, *, 2//}, and then to add the 400 from the inner sum... + But this is quite difficult, and cases like this one do not happen often. + + (Francois Irigoin consider that this case falls into the 0.01 percent + rule, and it is no worth to implement a solution for this testcase in a + production compiler. ) +*/ + +/* Do nothing for this testcase. + The following evolutions are detected: + + i -> {0, +, 1}_2 + a -> {{2, *, [-oo, +oo]}_1, +, 4}_2 + +*/ + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-29.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-29.c new file mode 100644 index 00000000000..5d639a9dfae --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-29.c @@ -0,0 +1,41 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int bar (void); + +int foo () +{ + int i; + int a = 2; + + while (a) + { + a *= 3; + a += 5; + } +} + +/* FIXME: This exposes a problem in the representation. Is it + possible to have an exponential and a polynomial together? + + The first assignment constructs "a -> {2, *, 3}_1", + while the second adds 5 as a polynomial function. + + The following two representations are not correct: + "a -> {{2, *, 3}_1, +, 5}_1" + "a -> {{2, +, 5}_1, *, 3}_1" + + The right solution is: + "a -> {2, *, 3}_1 + {0, +, 5}_1" + but this exposes yet again the "exp + poly" problem: the representation + is not homogen. Going into a Taylor decomposition could solve this problem. + + This is too difficult for the moment, and does not happen often. +*/ + +/* Do nothing for this testcase. */ + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-37.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-37.c new file mode 100644 index 00000000000..746a81e68fe --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-37.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a; + int b = 2; + int c = 11; + + for (a = -123; a < 0; c += 12, b += 5) + { + a += b; + + /* The next stmt exercises the add_function_to_loop_evolution + (loop_num = 1, chrec_before = {-123, +, {2, +, 5}_1}_1, to_add = {11, +, 12}_1). + The result should be: {-123, +, {13, +, 17}_1}_1. */ + a += c; + } +} + +/* + b -> {2, +, 5}_1 + c -> {11, +, 12}_1 + a -> {-123, +, {13, +, 17}_1}_1 +*/ + + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-38.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-38.c new file mode 100644 index 00000000000..bdfe8bc6bfd --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-38.c @@ -0,0 +1,49 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 3; + int b = 2; + int c = 11; + int d = -5; + + while (a) + { + b += 5; + a += b; + + for (d = -5; d < 0; d++) + { + /* Exercises the build_polynomial_evolution_in_loop function in the following context: + (add_to_evolution + loop_num = 2 + chrec_before = {3, +, 7, +, 5}_1 + to_add = {11, +, 12}_1 + res = {{3, +, 7, +, 5}_1, +, {11, +, 12}_1}_2 + ) + + This also exercises the chrec_apply function in the following context: + (chrec_apply + var = 2 + chrec = {0, +, {11, +, 12}_1}_2 + x = 5 + res = {55, +, 60}_1 + ) + */ + a += c; + } + c += 12; + } +} + +/* + b -> {2, +, 5}_1 + c -> {11, +, 12}_1 + d -> {-5, +, 1}_2 + a -> {{3, +, 62, +, 65}_1, +, {11, +, 12}_1}_2 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-39.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-39.c new file mode 100644 index 00000000000..87d844482e7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-39.c @@ -0,0 +1,46 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int foo (int ParmN) +{ + int a = 3; + int b = 2; + int d = -5; + + while (a) + { + b += 25; + a += b; + + for (d = -5; d < 0; d++) + { + /* Exercises the build_polynomial_evolution_in_loop in the following context: + (add_to_evolution + loop_num = 2 + chrec_before = {3, +, {27, +, 25}_1}_1 + to_add = ParmN_15 + res = {{3, +, {27, +, 25}_1}_1, +, ParmN_15}_2 + ) + + Then it exercises the add_expr_to_loop_evolution in the following context: + (add_to_evolution + loop_num = 1 + chrec_before = {{3, +, {27, +, 25}_1}_1, +, ParmN_15}_2 + to_add = ParmN_15 * 5 + res = {{3, +, {ParmN_15 * 5 + 27, +, 25}_1}_1, +, ParmN_15}_2 + ) + */ + a += ParmN; + } + } +} + +/* + b -> {2, +, 25}_1 + d -> {-5, +, 1}_2 + a -> {{3, +, {ParmN * 5 + 27, +, 25}_1}_1, +, ParmN}_2 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-40.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-40.c new file mode 100644 index 00000000000..7a1ecf7d5bd --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-40.c @@ -0,0 +1,23 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 1; + int b = 1; + + while (a) + { + a += b; + b *= 2; + } +} + +/* + b -> {1, *, 2}_1 + a -> {1, +, {1, *, 2}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c new file mode 100644 index 00000000000..ab93fbcaf98 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-41.c @@ -0,0 +1,53 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 2; + int b = 4; + int c = 2; + + while (a) + { + a *= 3; + for (c = -10; c < 0; c++) + { + /* Exercises the build_exponential_evolution_in_loop function in the following context: + (multiply_evolution + loop_num = 2 + chrec_before = {2, *, 3}_1 + to_mult = {4, *, 5}_1 + res = {{2, *, 3}_1, *, {4, *, 5}_1}_2 + ) + + Then it exerces the chrec_apply in the following context: + (chrec_apply + var = 2 + chrec = {0, +, {4, *, 5}_1}_2 + x = 10 + res = {40, *, 5}_1 + ) + + Finally it tests the + (add_to_evolution + loop_num = 1 + chrec_before = {{2, *, 3}_1, *, {4, *, 5}_1}_2 + to_add = {40, *, 5}_1 + res = {{2, *, {120, *, 5}_1}_1, *, {4, *, 5}_1}_2 + ) + */ + a *= b; + } + b *= 5; + } +} + +/* + c -> {-10, +, 1}_2 + b -> {4, *, 5}_1 + a -> {{2, *, {120, *, 5}_1}_1, *, {4, *, 5}_1}_2 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-42.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-42.c new file mode 100644 index 00000000000..33378ddfa9c --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-42.c @@ -0,0 +1,31 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 1; + int b = 2; + int c = 0; + int d = 5; + + while (a) + { + a += b; + a += d; + + b += c; + c += 1; + d += 9; + } +} + +/* + c -> {0, +, 1}_1 + b -> {2, +, 0, +, 1}_1 + d -> {5, +, 9}_1 + a -> {1, +, 7, +, 9, +, 1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-43.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-43.c new file mode 100644 index 00000000000..329f205506f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-43.c @@ -0,0 +1,65 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + + +int main () +{ + int a = 1; + int b = 2; + int c = 0; + int d = 5; + int e; + + while (a) + { + /* The following statement produces the evolution function: + (add_to_evolution + loop_num = 1 + chrec_before = 1 + to_add = {{2, +, 0}_1, +, 10}_1 + res = {{{1, +, 2}_1, +, 0}_1, +, 10}_1 + ) + Note that the evolution of B in the inner loop_2 is not + relevant to the evolution of A in the loop_1. */ + a += b; + + /* And finally the following statement produces the expected scev: + (add_to_evolution + loop_num = 1 + chrec_before = {{{1, +, 2}_1, +, 0}_1, +, 10}_1 + to_add = {5, +, 9}_1 + res = {{{1, +, 7}_1, +, 9}_1, +, 10}_1 + ) + That ends this not so formal proof ("CQFD" in french ;-). */ + a += d; + + for (e = 0; e < 10; e++) + b += c; + /* After having analyzed this loop, the overall effect is added to the evolution of b. + This corresponds to the following operation: + (add_to_evolution + loop_num = 1 + chrec_before = {2, +, {0, +, 1}_1}_2 + to_add = {0, +, 10}_1 + res = {{{2, +, 0}_1, +, 10}_1, +, {0, +, 1}_1}_2 + ). + Note that the variable c has not yet been updated in the loop, and thus its value + at this version is "{0, +, 1}_1". Since the loop_2 runs exactly 10 times, the overall + effect of the loop is "10 * {0, +, 1}_1": that is the TO_ADD argument. + */ + + c += 1; + d += 9; + } +} + +/* + c -> {0, +, 1}_1 + e -> {0, +, 1}_2 + b -> {{2, +, 0, +, 10}_1, +, {0, +, 1}_1}_2 + d -> {5, +, 9}_1 + a -> {1, +, 7, +, 9, +, 10}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-44.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-44.c new file mode 100644 index 00000000000..86308138d37 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-44.c @@ -0,0 +1,39 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +/* That's a reduced testcase of one of my favourite simulation programs. + This is also known under the name: "Newton's falling apple". + The general version is known under the name: "the N-body simulation problem". + + The physics terminology is the best to describe the scalar evolution algorithm: + - first determine the initial conditions of the system, + - then analyze its evolution. +*/ + +double Newton_s_apple () +{ + /* Initial conditions. */ + double g = -10.0; + double speed_z = 0; + double altitude = 3000; + double delta_t = 0.1; + double total_time = 0; + + /* Laws of evolution. */ + while (altitude > 0.0) + { + speed_z += g * delta_t; + altitude += speed_z * delta_t; + total_time += delta_t; + } + + return total_time; +} + +/* + speed_z -> {0.0, +, -1.0e+0}_1 + altitude -> {3.0e+3, +, {(0.0 + -1.0e+0) * 1.00000000000000005551115123125782702118158340454e-1, +, -1.0e+0 * 1.00000000000000005551115123125782702118158340454e-1}_1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-45.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-45.c new file mode 100644 index 00000000000..40f09a236f3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-45.c @@ -0,0 +1,45 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +/* That's a reduced testcase of one of my favourite simulation programs. + This is also known under the name: "Newton's falling apple". + The general version is known under the name: "the N-body simulation problem". + + The physics terminology is the best to describe the scalar evolution algorithm: + - first determine the initial conditions of the system, + - then analyze its evolution. +*/ + +double Newton_s_apple () +{ + /* Initial conditions. */ + double g = 10.0; + double speed_z = 0; + double altitude = 3000; + double delta_t = 0.1; + double total_time = 0; + + /* Laws of evolution. */ + while (altitude > 0.0) + { + speed_z += g * delta_t; + altitude -= speed_z * delta_t; + total_time += delta_t; + } + + return total_time; +} + +/* + speed_z -> {0.0, +, 1.0e+0}_1 + altitude -> {3.0e+3, +, {(0.0 + 1.0e+0) * 1.00000000000000005551115123125782702118158340454e-1 * -1, +, 1.0e+0 * 1.00000000000000005551115123125782702118158340454e-1 * -1}_1}_1 + + When computing evolutions in the "symbolic as long as possible" strategy, + the analyzer extracts only the following: + + altitude -> {3.0e+3, +, T.2_11 * -1}_1 + +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-46.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-46.c new file mode 100644 index 00000000000..b97d6f87fab --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-46.c @@ -0,0 +1,19 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int +foo (int i, + int precision) +{ + i = precision - i - 1; + + /* At this point the analyzer is confused by the initialisation of "i". + It keeps the initial condition under a symbolic form: "i_1". */ + + while (--i); +} + +/* i -> {i_1, +, -1}_1 */ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-47.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-47.c new file mode 100644 index 00000000000..bd5afc50b7e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-47.c @@ -0,0 +1,36 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int +foo (int unknown_parm, int a, int b) +{ + int p; + + if (unknown_parm) + { + p = a + 2; + } + else + { + p = b + 1; + } + + /* At this point the initial condition of "p" is unknown. + In this case, the analyzer has to keep the initial condition under a symbolic form. */ + + while (p) + p--; + +} + +/* + p -> {p_1, +, -1}_1 + + or, when the Value Range Propagation does its work: + + p -> {[MIN_EXPR <p_4, p_6>, MAX_EXPR <p_4, p_6>], +, -1}_1 + +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-48.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-48.c new file mode 100644 index 00000000000..fbd3c98bb29 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-48.c @@ -0,0 +1,30 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int +foo (int *c) +{ + int i; + int j = 10; + + for (i = 0; i < 5; i++) + { + for (j = 10;; j--) + { + if (j == 0) + break; + + *(c + j) = *(c + j) - 1; + } + } + + return j; +} + +/* + j -> {10, +, -1}_2 + i -> {0, +, 1}_1 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-49.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-49.c new file mode 100644 index 00000000000..413758aa6f6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-49.c @@ -0,0 +1,26 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int +foo (int *c) +{ + int i = 0; + int j = 10; + + while (1) + { + if (i == j) + break; + + i++; + j--; + } + + return j; +} + +/* i -> {0, +, 1}_1 */ +/* j -> {10, +, -1}_1 */ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-50.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-50.c new file mode 100644 index 00000000000..b3ea5b5dfb9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-50.c @@ -0,0 +1,27 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int +foo (int *c) +{ + int i = 0; + int j = 10; + + while (1) + { + /* This case exercises the number of iterations detector for + {0, +, 1}_1 == {10, +, -1}_1 + */ + if (i == j) + break; + + i++; + j--; + } + + return j; +} + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-51.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-51.c new file mode 100644 index 00000000000..c0a7f51f8ff --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-51.c @@ -0,0 +1,23 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int +foo (int j) +{ + int i = 0; + int temp_var; + + while (i < 100) + { + /* This exercises the analyzer on strongly connected + components: here "i -> temp_var -> i". */ + temp_var = i + j; + i = temp_var + 2; + } + + return i; +} + +/* FIXME. */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-53.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-53.c new file mode 100644 index 00000000000..3933c21e360 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-53.c @@ -0,0 +1,129 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details " } */ + +#define N 16 + +void fbar (float *); +void ibar (int *); +void sbar (short *); + +/* Should be vectorized */ + +foo (int n) +{ + float a[N+1]; + float b[N]; + float c[N]; + float d[N]; + int ia[N]; + int ib[N]; + int ic[N]; + double da[N]; + double db[N]; + short sa[N]; + short sb[N]; + short sc[N]; + int i,j; + int diff = 0; + char cb[N]; + char cc[N]; + char image[N][N]; + char block[N][N]; + + /* Not vetorizable yet (unknown loop bound). */ + for (i = 0; i < n; i++){ + a[i] = b[i]; + } + fbar (a); + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i]; + } + fbar (a); + + /* Not Vectorizable (mode not supported). */ + for (i = 0; i < N; i++){ + da[i] = db[i]; + } + fbar (a); + + /* Not vetorizable yet (constant assignment). */ + for (i = 0; i < N; i++){ + a[i] = 5; + } + fbar (a); + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i] + c[i] + d[i]; + } + fbar (a); + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i] * c[i]; + } + fbar (a); + + /* Vectorizable. */ + for (i = 0; i < N/2; i++){ + a[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; + d[i] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; + } + fbar (a); + + /* Not vetorizable yet (too conservative dependence test). */ + for (i = 0; i < N/2; i++){ + a[i] = b[i+N/2] * c[i+N/2] - b[i] * c[i]; + a[i+N/2] = b[i] * c[i+N/2] + b[i+N/2] * c[i]; + } + fbar (a); + + /* Not vetorizable yet (access pattern). */ + for (i = 0; i < N/2; i++){ + a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i]; + d[i] = b[2*i] * c[2*i+1] + b[2*i+1] * c[2*i]; + } + fbar (a); + + /* Not vetorizable yet (too conservative dependence test; access pattern). */ + for (i = 0; i < N/2; i++){ + a[2*i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i]; + a[2*i+1] = b[2*i] * c[2*i+1] + b[2*i+1] * c[2*i]; + } + fbar (a); + + /* Not vetorizable yet (no support for integer mult). */ + for (i = 0; i < N; i++){ + ia[i] = ib[i] * ic[i]; + } + ibar (ia); + + /* Vectorizable. */ + for (i = 0; i < N; i++){ + a[i] = b[i] + c[i]; + d[i] = b[i] + c[i]; + ia[i] = ib[i] + ic[i]; + } + ibar (ia); + fbar (a); + fbar (d); + + /* Not vectorizable yet (two types with different nunits in vector). */ + for (i = 0; i < N; i++){ + ia[i] = ib[i] + ic[i]; + sa[i] = sb[i] + sc[i]; + } + ibar (ia); + sbar (sa); + + /* Not vetorizable yet (too conservative dependence test). */ + for (i = 0; i < N; i++){ + a[i] = b[i] + c[i]; + a[i+1] = b[i] + c[i]; + } + fbar (a); +} + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-54.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-54.c new file mode 100644 index 00000000000..1f64eb4e22d --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-54.c @@ -0,0 +1,34 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int main(void) +{ + int a = 5; + int b = 6; + int c = 20; + + while (a <= 100) + { + int i; + + a = b; + for (i = 0; i <= 12; i++) + { + a++; + } + b = b + c; + } +} + +/* This example has been distilled from Pattern1 that cannot be + handled: "Big steps, small steps" from the ICS'01 paper "Monotonic + Evolution" by Peng Wu. + + The analyzer has to detect the following evolution functions: + i -> {0, +, 1}_2 + b -> {6, +, 20}_1 + a -> {{6, +, 20}_1, +, 1}_2 +*/ + +/* FIXME. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-55.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-55.c new file mode 100644 index 00000000000..f89f825f100 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-55.c @@ -0,0 +1,18 @@ +/* APPLE LOCAL file lno */ +#include <stdio.h> +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-lptest-details" } */ + +int main(int argc) +{ + int I, J; + const int N = 30; + const int M = 40; + for (J = argc; J < N; J += 3) + { + for (I = J; I < M; I++) + { + printf ("%d %d\n", I, J); + } + } +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-56.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-56.c new file mode 100644 index 00000000000..4230b4726e5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-56.c @@ -0,0 +1,22 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-optimized" } */ + +void remove_me (void); + +int main (void) +{ + int a = -100; + int b = 0; + int c = 3; + + for (a = 0; a < 100; a++) + { + b = b + 3; + if (b != c) + remove_me (); + c = c + 3; + } +} + +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-57.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-57.c new file mode 100644 index 00000000000..0d938f6dd25 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-57.c @@ -0,0 +1,24 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-optimized" } */ + +void remove_me (void); + +int main (void) +{ + int a = -100; + int b = 0; + int c = 3; + + for (a = 0; a < 100; a++) + { + if (b > c) + remove_me (); + b = b + 2; + c = c + 3; + } +} + + +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-58.c b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-58.c new file mode 100644 index 00000000000..c5e8964c01b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-58.c @@ -0,0 +1,23 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -floop-test -fdump-tree-optimized" } */ + +void remove_me (void); + +int main (void) +{ + int a, b; + int N = 100; + + a = 0; + b = 0; + while (a < N) + { + if (b >= 5*N - 4) + remove_me (); + a++; + b+=5; + } +} + +/* { dg-final { scan-tree-dump-times "remove_me" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-chrec/tree-ssa-scev.exp b/gcc/testsuite/gcc.dg/tree-ssa-chrec/tree-ssa-scev.exp new file mode 100644 index 00000000000..46fcf02054f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-chrec/tree-ssa-scev.exp @@ -0,0 +1,36 @@ +# APPLE LOCAL file lno +# Copyright (C) 1997 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# GCC testsuite that uses the `dg.exp' driver. + +# Load support procs. +load_lib gcc-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CFLAGS +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS " -ansi -pedantic-errors" +} + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" $DEFAULT_CFLAGS + +# All done. +dg-finish diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/ifc-01.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/ifc-01.c new file mode 100644 index 00000000000..6f86290c629 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/ifc-01.c @@ -0,0 +1,55 @@ +/* APPLE LOCAL file AV */ +/* { dg-do run { target powerpc*-*-* i?86-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse" { target i?86-*-* } } */ + +#include <stdarg.h> +#include <signal.h> + +extern void abort (void); +extern void exit (int); +#define N 16 +#define MAX 42 + +int main1 () +{ + int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; + + int i, j; + + for (i = 0; i < N; i++) + { + j = A[i]; + A[i] = ( j >= MAX ? MAX : 0); + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (A[i] > MAX) + abort (); + } + + return 0; +} + +void +sig_ill_handler (int sig) +{ + exit(0); +} + +int main (void) +{ + /* Exit on systems without altivec. */ + signal (SIGILL, sig_ill_handler); + /* Altivec instruction, 'vor %v0,%v0,%v0'. */ + asm volatile (".long 0x10000484"); + signal (SIGILL, SIG_DFL); + + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/ifc-02.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/ifc-02.c new file mode 100644 index 00000000000..5d996ef832b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/ifc-02.c @@ -0,0 +1,49 @@ +/* APPLE LOCAL file */ +/* { dg-do compile { target powerpc*-*-* i?86-*-* } } */ +/* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-vect-details -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-vect-details -msse" { target i?86-*-* } } */ + +#include <stdarg.h> +#include <signal.h> + +extern int c; +struct A; +typedef struct A *A_def; +static A_def *data; + +extern void abort (void); +extern void exit (int); + +#define N 128 + +int main1 () +{ + + unsigned int i; + + for (i = 0; i < N; i++) + if (c) + data[i] = 0; + + return 0; +} + +void +sig_ill_handler (int sig) +{ + exit(0); +} + +int main (void) +{ + /* Exit on systems without altivec. */ + signal (SIGILL, sig_ill_handler); + /* Altivec instruction, 'vor %v0,%v0,%v0'. */ + asm volatile (".long 0x10000484"); + signal (SIGILL, SIG_DFL); + + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "Applying if-conversion" 1 "vect" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c new file mode 100644 index 00000000000..3a968ff25ea --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c @@ -0,0 +1,23 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile { target powerpc*-*-* i?86-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* } } */ + +#define VECTOR_SIZE 512 +typedef float afloat __attribute__ ((__aligned__(16))); + +extern void check(const afloat * __restrict__ v); + +void square(const afloat * __restrict__ a, + afloat * __restrict__ out) +{ + unsigned int i; + for (i = 0; i < VECTOR_SIZE; i++) { + float ai = a[i]; + float a2 = ai * ai; + out[i] = a2; + } + check(out); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-31.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-31.c new file mode 100644 index 00000000000..d1e77acc6e0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-31.c @@ -0,0 +1,44 @@ +/* APPLE LOCAL file lno */ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */ + +#include <stdarg.h> +#include "tree-vect.h" + +typedef char achar __attribute__ ((__aligned__(16))); + +#define N 16 + +int main1 () +{ + struct { + achar ca[N]; + } s; + int i; + + for (i = 0; i < N; i++) + { + s.ca[i] = 5; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.ca[i] != 5) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-35.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-35.c new file mode 100644 index 00000000000..14591764e9f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect-35.c @@ -0,0 +1,43 @@ +/* APPLE LOCAL file lno */ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 16 + +int main1 () +{ + struct { + char ca[N]; + } s; + char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45}; + int i; + + for (i = 0; i < N; i++) + { + s.ca[i] = cb[i]; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (s.ca[i] != cb[i]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect.exp b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect.exp new file mode 100644 index 00000000000..46fcf02054f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-ssa-vect.exp @@ -0,0 +1,36 @@ +# APPLE LOCAL file lno +# Copyright (C) 1997 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# GCC testsuite that uses the `dg.exp' driver. + +# Load support procs. +load_lib gcc-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CFLAGS +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS " -ansi -pedantic-errors" +} + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" $DEFAULT_CFLAGS + +# All done. +dg-finish diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-vect.h b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-vect.h new file mode 100644 index 00000000000..f56e83138b3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/tree-vect.h @@ -0,0 +1,25 @@ +/* APPLE LOCAL file lno */ +/* Check if system supports SIMD */ +#include <signal.h> + +extern void exit (int); +extern void abort (void); + +void +sig_ill_handler (int sig) +{ + exit(0); +} + +void check_vect (void) +{ + signal(SIGILL, sig_ill_handler); +#if defined(__ppc__) || defined(__ppc64__) + /* Altivec instruction, 'vor %v0,%v0,%v0'. */ + asm volatile (".long 0x10000484"); +#elif defined(__i386__) || defined(__x86_64__) + /* SSE2 instruction: movsd %xmm0,%xmm0 */ + asm volatile (".byte 0xf2,0x0f,0x10,0xc0"); +#endif + signal (SIGILL, SIG_DFL); +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c index a1ef017dfda..7e645a85864 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom3" } */ +/* APPLE LOCAL lno */ +/* { dg-options "-O1 -fdump-tree-dom3 -ftree-loop-optimize" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c index 2c8a84a494d..e9f57e40f1d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom3" } */ +/* APPLE LOCAL lno */ +/* { dg-options "-O1 -fdump-tree-dom3 -ftree-loop-optimize" } */ union tree_node; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040308-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040308-1.c new file mode 100644 index 00000000000..987aad09519 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040308-1.c @@ -0,0 +1,19 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-phiopt1-details" } */ + +int t( int i) +{ + int j; + if(i ==0) + j = 1; + else + j = 0; + + + return j; +} + +/* We should convert one COND_EXPRs into straightline code. */ +/* { dg-final { scan-tree-dump-times "straightline" 1 "phiopt1" {xfail *-*-* } } } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040308-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20040308-2.c new file mode 100644 index 00000000000..23fad9a47e3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040308-2.c @@ -0,0 +1,19 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-phiopt1-details -fdump-tree-tailc-details" } */ + + +int f(int i) +{ + int result; + result = t(i); + if (result) + return result; + return 0; +} + +/* We should convert one COND_EXPRs into straightline code. */ +/* { dg-final { scan-tree-dump-times "straightline" 1 "phiopt1" } } */ +/* Also we should have found that the call to t is tail called. */ +/* { dg-final { scan-tree-dump-times "Found tail call" 1 "tailc" } } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040308-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20040308-3.c new file mode 100644 index 00000000000..962734fdf6a --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040308-3.c @@ -0,0 +1,18 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-phiopt1-details" } */ + +int t( int i) +{ + int j; + if(i>=0) + j = i; + else + j = -i; + return j; +} + +/* We should convert one COND_EXPRs into straightline code with ABS. */ +/* { dg-final { scan-tree-dump-times "straightline" 1 "phiopt1"} } */ +/* { dg-final { scan-tree-dump-times "ABS_EXPR" 1 "phiopt1"} } */ + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c index 5f99be2874e..4b09b536d13 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-ssa-vops" } */ +/* { dg-options "-O1 -fdump-tree-alias1-vops" } */ extern void abort (void); int a; @@ -17,5 +17,4 @@ void bar (void) malloc functions may clobber global memory. Only the function result does not alias any other pointer. Hence, we must have a VDEF for a before and after the call to foo(). */ -/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 1 "ssa"} } */ - +/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 1 "alias1"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c new file mode 100644 index 00000000000..89b90643e17 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20041122-1.c @@ -0,0 +1,39 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-dom3" } */ + + +typedef unsigned int size_t; +extern void *xmalloc (size_t) __attribute__ ((__malloc__)); +struct edge_def +{ + struct basic_block_def *dest; + int flags; +}; +typedef struct edge_def *edge; +struct basic_block_def +{ + int flags; +}; +typedef struct basic_block_def *basic_block; +extern int n_basic_blocks; +extern edge frob (); +void +find_unreachable_blocks (int frobit) +{ + basic_block *tos, *worklist, bb; + tos = worklist = xmalloc (sizeof (basic_block) * n_basic_blocks); + edge e = frob(); + if (!(e->dest->flags & 4)) + { + e->dest->flags |= 4; + *tos++ = e->dest; + } +} + +/* If the aliasing code does its job properly, then we should be + able to determine that modifying e->dest->flags does not + modify e or e->dest. The net result is that we only need one + load of e->dest. */ +/* { dg-final { scan-tree-dump-times "->dest" 1 "dom3" { xfail *-*-* } } } */ + + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20050215-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20050215-1.c new file mode 100644 index 00000000000..6ce588038aa --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/20050215-1.c @@ -0,0 +1,13 @@ +/* PR middle-end/19857 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +int i; +int foo (void) +{ + return i & ~(unsigned int) 3; +} + +/* Make sure the optimizers don't introduce overflow where one + did not exist in the original. */ +/* { dg-final { scan-tree-dump-times "-0+4" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/complex-1.c b/gcc/testsuite/gcc.dg/tree-ssa/complex-1.c new file mode 100644 index 00000000000..7dff01ce425 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/complex-1.c @@ -0,0 +1,12 @@ +/* Verify that we don't libcall for complex * real. */ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -O -fdump-tree-optimized" } */ + +typedef _Complex float C; + +C foo(C x, float y) +{ + return x * y; +} + +/* { dg-final { scan-tree-dump-times "__mul" 0 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/complex-2.c b/gcc/testsuite/gcc.dg/tree-ssa/complex-2.c new file mode 100644 index 00000000000..ce72eb2172f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/complex-2.c @@ -0,0 +1,12 @@ +/* Verify that we don't libcall for complex / real. */ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -O -fdump-tree-optimized" } */ + +typedef _Complex float C; + +C foo(C x, float y) +{ + return x / y; +} + +/* { dg-final { scan-tree-dump-times "__div" 0 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline_asm-1.c b/gcc/testsuite/gcc.dg/tree-ssa/inline_asm-1.c new file mode 100644 index 00000000000..4b241c30ba2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline_asm-1.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-optimized -fdump-tree-alias1-vops" } */ +/* Test to make sure that inline-asm causes a V_MAY_DEF and that we call test_function twice. */ + +char test_function(void ) __attribute__((__pure__)); +char f(char *a) +{ + char b = test_function(); + asm("":"=m"(*a):"r"(b)); + b = test_function(); + return b; +} + +/* test_function should be called twice as the inline-asm changes memory. */ +/* { dg-final { scan-tree-dump-times "test_function" 2 "optimized"} } */ + +/* There should a V_MAY_DEF for the inline-asm. */ +/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 1 "alias1"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline_asm-2.c b/gcc/testsuite/gcc.dg/tree-ssa/inline_asm-2.c new file mode 100644 index 00000000000..ef8f9607056 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline_asm-2.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-alias1-vops" } */ +/* Test to make sure that inline-asm causes a V_MAY_DEF. */ + + +void link_error(); +void f(char *a) +{ + int *a1 = (int *)a; + if (*a == 0) + asm("":"=m"(*a1)); + if (*a == 0) + link_error (); +} + +/* There should a V_MAY_DEF for the inline-asm and one for the link_error. */ +/* { dg-final { scan-tree-dump-times "V_MAY_DEF" 2 "alias1"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivcanon-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ivcanon-1.c new file mode 100644 index 00000000000..c9fc2003ec7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ivcanon-1.c @@ -0,0 +1,38 @@ +/* APPLE LOCAL file lno */ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-loop-optimize -funroll-loops -fdump-tree-optimized" } */ + +void foo(void) +{ + int n = 16875; + + while (n) + { + if (n&1) + bar (n); + n >>= 1; + } +} + +static inline int power (long x, unsigned int n) +{ + long y = n % 2 ? x : 1; + + while (n >>= 1) + { + x = x * x; + if (n % 2) + y = y * x; + } + + return y; +} + +void test(long x) +{ + bar (power (x, 10)); + bar (power (x, 27)); +} + +/* All loops should be completely unrolled, so there should be no labels. */ +/* { dg-final { scan-tree-dump-times "<L" 0 "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-7.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-7.c new file mode 100644 index 00000000000..e5a408321d7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-7.c @@ -0,0 +1,34 @@ +/* PR tree-optimization/19828 */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-lim-details" } */ + +int cst_fun1 (int) __attribute__((__const__)); +int cst_fun2 (int) __attribute__((__const__)); +int pure_fun1 (int) __attribute__((__pure__)); +int pure_fun2 (int) __attribute__((__pure__)); +int foo (void); + +int xxx (void) +{ + int i, k = foo (), x = 0; + + for (i = 0; i < 100; i++) + { + x += cst_fun1 (k); + x += pure_fun1 (k); + + if (k) + { + x += cst_fun2 (k); + x += pure_fun2 (k); + } + } + + return x; +} + +/* Calls to cst_fun1 and pure_fun1 may be moved out of the loop. + Calls to cst_fun2 and pure_fun2 should not be, since calling + with k = 0 may be invalid. */ + +/* { dg-final { scan-tree-dump-times "Moving statement" 2 "lim" } } */ diff --git a/gcc/testsuite/gcc.dg/ucnid-1.c b/gcc/testsuite/gcc.dg/ucnid-1.c new file mode 100644 index 00000000000..da8a445d239 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ucnid-1.c @@ -0,0 +1,27 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ +void abort (void); + +int main (void) +{ + int \u00C0 = 1; + int \u00C1 = 2; + int \U000000C2 = 3; + int wh\u00ff = 4; + int a\u00c4b\u0441\U000003b4e = 5; + + if (\u00C0 != 1) + abort (); + if (\u00c1 != 2) + abort (); + if (\u00C2 != 3) + abort (); + if (wh\u00ff != 4) + abort (); + if (a\u00c4b\u0441\U000003b4e != 5) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/ucnid-2.c b/gcc/testsuite/gcc.dg/ucnid-2.c new file mode 100644 index 00000000000..e4ad6437c1c --- /dev/null +++ b/gcc/testsuite/gcc.dg/ucnid-2.c @@ -0,0 +1,28 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ +void abort (void); + +static int \u00C0 = 1; +static int \u00C1 = 2; +static int \U000000C2 = 3; +static int wh\u00ff = 4; +static int a\u00c4b\u0441\U000003b4e = 5; + +int main (void) +{ + + if (\u00C0 != 1) + abort (); + if (\u00c1 != 2) + abort (); + if (\u00C2 != 3) + abort (); + if (wh\u00ff != 4) + abort (); + if (a\u00c4b\u0441\U000003b4e != 5) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/ucnid-3.c b/gcc/testsuite/gcc.dg/ucnid-3.c new file mode 100644 index 00000000000..af35b7eeb60 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ucnid-3.c @@ -0,0 +1,28 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ +void abort (void); + +int \u00C0 = 1; +int \u00C1 = 2; +int \U000000C2 = 3; +int wh\u00ff = 4; +int a\u00c4b\u0441\U000003b4e = 5; + +int main (void) +{ + + if (\u00C0 != 1) + abort (); + if (\u00c1 != 2) + abort (); + if (\u00C2 != 3) + abort (); + if (wh\u00ff != 4) + abort (); + if (a\u00c4b\u0441\U000003b4e != 5) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/ucnid-4.c b/gcc/testsuite/gcc.dg/ucnid-4.c new file mode 100644 index 00000000000..c248fd69dda --- /dev/null +++ b/gcc/testsuite/gcc.dg/ucnid-4.c @@ -0,0 +1,28 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ +void abort (void); + +int \u00C0(void) { return 1; } +int \u00C1(void) { return 2; } +int \U000000C2(void) { return 3; } +int wh\u00ff(void) { return 4; } +int a\u00c4b\u0441\U000003b4e(void) { return 5; } + +int main (void) +{ + + if (\u00C0() != 1) + abort (); + if (\u00c1() != 2) + abort (); + if (\u00C2() != 3) + abort (); + if (wh\u00ff() != 4) + abort (); + if (a\u00c4b\u0441\U000003b4e() != 5) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/ucnid-5.c b/gcc/testsuite/gcc.dg/ucnid-5.c new file mode 100644 index 00000000000..ddbf766d3b2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ucnid-5.c @@ -0,0 +1,16 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99 -fdollars-in-identifiers" } */ +void abort (void); + +int a$b(void) { return 1; } + +int main (void) +{ + + if (a\u0024b() != 1) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/ucnid-6.c b/gcc/testsuite/gcc.dg/ucnid-6.c new file mode 100644 index 00000000000..d0116413d82 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ucnid-6.c @@ -0,0 +1,28 @@ +/* APPLE LOCAL begin mainline UCNs 2005-04-17 3892809 */ +/* { dg-do run } */ +/* { dg-options "-std=c99 -save-temps" } */ +void abort (void); + +int \u00C0(void) { return 1; } +int \u00C1(void) { return 2; } +int \U000000C2(void) { return 3; } +int wh\u00ff(void) { return 4; } +int a\u00c4b\u0441\U000003b4e(void) { return 5; } + +int main (void) +{ + + if (\u00C0() != 1) + abort (); + if (\u00c1() != 2) + abort (); + if (\u00C2() != 3) + abort (); + if (wh\u00ff() != 4) + abort (); + if (a\u00c4b\u0441\U000003b4e() != 5) + abort (); + + return 0; +} +/* APPLE LOCAL end mainline UCNs 2005-04-17 3892809 */ diff --git a/gcc/testsuite/gcc.dg/uninit-C.c b/gcc/testsuite/gcc.dg/uninit-C.c index 45decf33521..741106cb463 100644 --- a/gcc/testsuite/gcc.dg/uninit-C.c +++ b/gcc/testsuite/gcc.dg/uninit-C.c @@ -3,7 +3,7 @@ /* { dg-options "-O -Wuninitialized" } */ /* Not all platforms support TImode integers. */ -#if defined(__LP64__) +#if defined(__LP64__) && !defined(__hppa__) typedef int TItype __attribute__ ((mode (TI))); #else typedef long TItype; diff --git a/gcc/testsuite/gcc.dg/vect/pr20122.c b/gcc/testsuite/gcc.dg/vect/pr20122.c new file mode 100644 index 00000000000..ff6ec75e5ab --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr20122.c @@ -0,0 +1,38 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +typedef short ashort __attribute__ ((__aligned__(16))); +ashort Kernshort[24]; +static void VecBug(ashort Kernel[8][24]) __attribute__((noinline)); +static void VecBug(ashort Kernel[8][24]); + +/* Doesn't occur of only inner-loop. */ +static void VecBug(ashort Kernel[8][24]) +{ + int k,i; + for (k = 0; k<8; k++) + for (i = 0; i<24; i++) + Kernshort[i] = Kernel[k][i]; +} + +int main (int argc, char **argv) +{ + check_vect (); + + ashort Kernel[8][24]; + int k,i; + + for (k = 0; k<8; k++) + for (i = 0; i<24; i++) + Kernel[k][i] = 0; + + VecBug(Kernel); + + return 0; +} + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ + diff --git a/gcc/testsuite/gcc.dg/vect/vect-11.c b/gcc/testsuite/gcc.dg/vect/vect-11.c index 1ad27604627..e2dab4d4aae 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-11.c +++ b/gcc/testsuite/gcc.dg/vect/vect-11.c @@ -1,5 +1,6 @@ /* { dg-require-effective-target vect_int } */ - +/* APPLE LOCAL 3972875 mainline 2005-04-18 */ +/* { dg-require-effective-target vect_int_mult } */ #include <stdarg.h> #include "tree-vect.h" @@ -35,4 +36,5 @@ int main (void) return main1 (); } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */ +/* APPLE LOCAL 3972875 mainline 2005-04-18 */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-11a.c b/gcc/testsuite/gcc.dg/vect/vect-11a.c new file mode 100644 index 00000000000..46b86dbb134 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-11a.c @@ -0,0 +1,52 @@ +/* APPLE LOCAL file 3972875 mainline 2005-04-18 */ +/* { dg-require-effective-target vect_int } */ +/* { dg-require-effective-target vect_int_mult } */ + +#include <stdarg.h> +#include "tree-vect.h" + +extern void abort (void); +void u () +{ + unsigned int A[4] = {0x08000000,0xffffffff,0xff0000ff,0xf0000001}; + unsigned int B[4] = {0x08000000,0x08000001,0xff0000ff,0xf0000001}; + unsigned int Answer[4] = {0,0xf7ffffff,0x0200fe01,0xe0000001}; + unsigned int C[4]; + int i, j; + + for (i=0; i<4; i++) + C[i] = A[i] * B[i]; + for (i=0; i<4; i++) + if (C[i] != Answer[i]) + abort (); +} +void s() +{ + signed int A[4] = {0x08000000,0xffffffff,0xff0000ff,0xf0000001}; + signed int B[4] = {0x08000000,0x08000001,0xff0000ff,0xf0000001}; + signed int Answer[4] = {0,0xf7ffffff,0x0200fe01, 0xe0000001}; + signed int C[4]; + int i, j; + + for (i=0; i<4; i++) + C[i] = A[i] * B[i]; + for (i=0; i<4; i++) + if (C[i] != Answer[i]) + abort (); +} + +int main1 () +{ + u(); + s(); + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-98.c b/gcc/testsuite/gcc.dg/vect/vect-98.c new file mode 100644 index 00000000000..d876bce124f --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-98.c @@ -0,0 +1,41 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 4 +#define DOT4( a, b ) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] ) + +int main1 (int ia[][N]) +{ + int i, j; + int ib[N] = {0,3,6,9}; + int ic[N][N]; + + for (i = 0; i < N; i++) + { + ic[0][i] = DOT4 (ia[i], ib); + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ic[0][i] != DOT4 (ia[i], ib)) + abort(); + } + + return 0; +} + +int main (void) +{ + int ia[N][N] = {{1,2,3,4},{2,3,5,7},{2,4,6,8},{22,43,55,77}}; + + check_vect (); + + return main1 (ia); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ +/* APPLE LOCAL xfail */ +/* { dg-final { scan-tree-dump-times "not vectorized: complicated access pattern" 1 "vect" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-dv-1.c b/gcc/testsuite/gcc.dg/vect/vect-dv-1.c new file mode 100644 index 00000000000..516956b8cab --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-dv-1.c @@ -0,0 +1,21 @@ +/* APPLE LOCAL file AV */ +/* Test compiler crash when dependence analyzer can not represent + dependence relation by distance vector. */ +/* { dg-do compile } */ + +int x[199]; + +void foo() + +{ + int t,j; + + for (j=99;j>0;j--) + x [j+j]=x[j]; + + for (j=198;j>=100;j--) + if(x[j]) + { + x[j-63]=x[j-3]-x[j]; + } +} diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-1.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-1.c new file mode 100644 index 00000000000..be35d3e7bff --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-1.c @@ -0,0 +1,76 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */ + +#include <stdarg.h> +#include <signal.h> + +#define N 64 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N]; + int B[N]; + int C[N]; + int D[N]; + + int i, j; + + for (i = 0; i < N; i++) + { + A[i] = i; + B[i] = i; + C[i] = i; + D[i] = i; + } + + /* Vectorizable */ + for (i = 0; i < 16; i++) + { + A[i] = A[i+20]; + } + + /* check results: */ + for (i = 0; i < 16; i++) + { + if (A[i] != A[i+20]) + abort (); + } + + /* Vectorizable */ + for (i = 0; i < 16; i++) + { + B[i] = B[i] + 5; + } + + /* check results: */ + for (i = 0; i < 16; i++) + { + if (B[i] != C[i] + 5) + abort (); + } + + /* Not vectorizable */ + for (i = 0; i < 4; i++) + { + C[i] = C[i+3]; + } + + /* check results: */ + for (i = 0; i < 4; i++) + { + if (C[i] != D[i+3]) + abort (); + } + + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-2.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-2.c new file mode 100644 index 00000000000..0f7de3fcb8f --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-2.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; + int B[N] = {0,0,42,42,42,0,0,0,0,0,42,42,42,42,42,0}; + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] >= MAX ? MAX : 0); + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-3.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-3.c new file mode 100644 index 00000000000..e9e862ba4f5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-3.c @@ -0,0 +1,32 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; + int B[N] = {0,0,0,42,42,0,0,0,0,0,42,42,42,42,42,0}; + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] > MAX ? MAX : 0); + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-4.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-4.c new file mode 100644 index 00000000000..75b397c0bd8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-4.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; + int B[N] = {42,42,42,0,0,42,42,42,42,42,0,0,0,0,0,42}; + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] <= MAX ? MAX : 0); + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-5.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-5.c new file mode 100644 index 00000000000..b2e55291495 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-5.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; + int B[N] = {42,42,0,0,0,42,42,42,42,42,0,0,0,0,0,42}; + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] < MAX ? MAX : 0); + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-6.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-6.c new file mode 100644 index 00000000000..776c9a6680e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-6.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N] = {36,39,42,45,43,32,21,42,23,34,45,56,67,42,89,11}; + int B[N] = {42,42,0,42,42,42,42,0,42,42,42,42,42,0,42,42}; + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] != MAX ? MAX : 0); + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-7.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-7.c new file mode 100644 index 00000000000..1647b6f89c0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-7.c @@ -0,0 +1,33 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,42,78,89,11}; + int B[N] = {42,42,0,42,42,42,42,42,42,42,42,42,0,42,42,42}; + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] == MAX ? 0 : MAX); + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-8.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-8.c new file mode 100644 index 00000000000..7ce84470382 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-8.c @@ -0,0 +1,37 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + unsigned short A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; + unsigned short B[N] = {0,0,0,3,1,0,0,0,0,0,3,14,25,36,47,0}; + unsigned int i, j; + unsigned m; + + for (i = 0; i < 16; i++) + { + m = A[i]; + A[i] = (unsigned short) ( m >= MAX ? m-MAX : 0); + } + + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c new file mode 100644 index 00000000000..ab2eeab6e72 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-9.c @@ -0,0 +1,40 @@ +/* APPLE LOCAL file AV data dependence */ +/* { dg-do run } */ +/* { dg-options "-O3 -funroll-loops -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ + + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11}; +int B[N] = {0,0,42,42,42,0,0,0,0,0,42,42,42,42,42,0}; +void foo () __attribute__((always_inline)); +void foo () +{ + int i, j; + + for (i = 0; i < 16; i++) + A[i] = ( A[i] >= MAX ? MAX : 0); +} + +int main () +{ + + int i, j; + foo (); + /* check results: */ + for (i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-none.c b/gcc/testsuite/gcc.dg/vect/vect-none.c index f5303b93e18..7dd004aab75 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-none.c +++ b/gcc/testsuite/gcc.dg/vect/vect-none.c @@ -107,6 +107,8 @@ foo (int n) /* Test 3 - no target support for integer mult. */ + /* APPLE LOCAL mainline 2005-04-18 */ + /* This loop is vectorized on platforms that support vect_int_mult. */ for (i = 0; i < N; i++) { ia[i] = ib[i] * ic[i]; @@ -133,6 +135,8 @@ foo (int n) /* Test 6 - condition in loop. */ + /* APPLE LOCAL mainline 2005-04-18 */ + /* This loop is vectorized on platformst that support vect_condition. */ for (i = 0; i < N; i++){ a[i] = (b[i] > 0 ? b[i] : 0); } @@ -181,4 +185,10 @@ foo (int n) } /* { dg-final { scan-tree-dump-times "vectorized " 3 "vect"} } */ -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 3 "vect"} } */ +/* APPLE LOCAL begin AV */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail powerpc*-*-* i?86-*-* x86_64-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target powerpc*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target powerpc*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target i?86-*-* x86_64-*-* ia64-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target i?86-*-* x86_64-*-* ia64-*-* } } } */ +/* APPLE LOCAL end AV */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-shift-1.c b/gcc/testsuite/gcc.dg/vect/vect-shift-1.c new file mode 100644 index 00000000000..d6c4bdc19d2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-shift-1.c @@ -0,0 +1,29 @@ +/* APPLE LOCAL file mainline 2005-04-05 3972515 */ +/* { dg-require-effective-target vect_shift } */ + +#include <stdarg.h> +#include <signal.h> + +#define N 16 +#define MAX 42 + +extern void abort(void); + +int main () +{ + unsigned int A[4] = {0x08000000,0x08000001,0xff0000ff,0xf0000001}; + unsigned int Answer[4] = {0x01000000,0x01000000,0x01fe0001f,0x1e000000}; + unsigned int B[4]; + int i, j; + + for (i=0; i<4; i++) + B[i] = A[i] >> 3; + for (i=0; i<4; i++) + if (B[i] != Answer[i]) + abort (); + return 0; +} + + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/verbose-asm-2.c b/gcc/testsuite/gcc.dg/verbose-asm-2.c new file mode 100644 index 00000000000..314ac949541 --- /dev/null +++ b/gcc/testsuite/gcc.dg/verbose-asm-2.c @@ -0,0 +1,13 @@ +/* APPLE LOCAL file */ +/* Test whether -fverbose-asm emits option values. */ +/* Contibuted by Devang Patel <dpatel@apple.com>. */ + +/* { dg-do compile } */ +/* { dg-options "-fverbose-asm" } */ +/* { dg-final { scan-assembler "fpeephole" } } */ + +int +main (int argc, char *argv []) +{ + return 0; +} diff --git a/gcc/testsuite/gcc.dg/visibility-7.c b/gcc/testsuite/gcc.dg/visibility-7.c index f5e6e9aae5c..aaa8165e3e0 100644 --- a/gcc/testsuite/gcc.dg/visibility-7.c +++ b/gcc/testsuite/gcc.dg/visibility-7.c @@ -1,6 +1,6 @@ /* Test warning from conflicting visibility specifications. */ /* { dg-do compile } */ -/* { dg-require-visibility "" } */ +/* { dg-require-visibility "protected" } */ /* { dg-final { scan-hidden "xyzzy" } } */ extern int diff --git a/gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c b/gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c deleted file mode 100644 index af4d15a0c2d..00000000000 --- a/gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run { target powerpc*-*-darwin* } } */ - -/* This check was originally in test vmx/varargs-4.c. It does not - match the expected behavior according to the PowerPC-64 ELF ABI. */ - -#include <altivec.h> - -extern void abort (void); -extern void exit (int); - -typedef struct n_a -{ - signed char m1; - short m2; - int m3; - double m4; - vector float m5; -} -n_a; - -typedef struct n_a_x -{ - n_a b; - char a; -} -n_a_x; - -int -main () -{ - if (sizeof (n_a_x) - sizeof (n_a) != sizeof (n_a)) - abort (); - exit (0); -} diff --git a/gcc/testsuite/gcc.dg/weak/weak-12.c b/gcc/testsuite/gcc.dg/weak/weak-12.c new file mode 100644 index 00000000000..72cc1445e4b --- /dev/null +++ b/gcc/testsuite/gcc.dg/weak/weak-12.c @@ -0,0 +1,17 @@ +/* Test for #pragma weak with declaration not at file scope. */ +/* { dg-do compile } */ +/* { dg-require-weak "" } */ +/* { dg-options "" } */ + +/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?foo" } } */ + +#pragma weak foo + +int +main (void) +{ + extern int foo (void); + if (&foo) + return foo (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c index c9448f032cf..2294ebf7b4e 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-3.c +++ b/gcc/testsuite/gcc.dg/weak/weak-3.c @@ -52,18 +52,18 @@ void * foo1e (void) extern void * ffoo1f (void); -extern void * ffoox1f (void); void * foo1f (void) { if (ffoo1f) /* { dg-warning "" } */ ffoo1f (); return 0; } +void * ffoox1f (void) { return (void *)0; } extern void * ffoo1f (void) __attribute__((weak, alias ("ffoox1f"))); /* { dg-warning "weak declaration" "weak declaration" } */ extern void * ffoo1g (void); -extern void * ffoox1g (void); +void * ffoox1g (void) { return (void *)0; } extern void * ffoo1g (void) __attribute__((weak, alias ("ffoox1g"))); void * foo1g (void) { diff --git a/gcc/testsuite/gcc.dg/weak/weak-9.c b/gcc/testsuite/gcc.dg/weak/weak-9.c index 95e8f809f38..abbd0201c46 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-9.c +++ b/gcc/testsuite/gcc.dg/weak/weak-9.c @@ -7,10 +7,11 @@ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f2" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f3" } } */ /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f4" } } */ -/* { dg-final { scan-assembler "notf1" } } */ -/* { dg-final { scan-assembler "notf2" } } */ -/* { dg-final { scan-assembler "notf3" } } */ -/* { dg-final { scan-assembler "notf4" } } */ + +void notf1() { } +void notf2() { } +void notf3() { } +void notf4() { } void f1() __attribute__((weak, alias("notf1"))); void f2() __attribute__((alias("notf2"), weak)); diff --git a/gcc/testsuite/gcc.dg/winline-6.c b/gcc/testsuite/gcc.dg/winline-6.c index 7ce7481a3ef..dd8d3a81b08 100644 --- a/gcc/testsuite/gcc.dg/winline-6.c +++ b/gcc/testsuite/gcc.dg/winline-6.c @@ -17,5 +17,5 @@ inline int q(void) } inline int t (void) { - return q (); /* { dg-warning "called from here" } */ + return q () + 1; /* { dg-warning "called from here" } */ } |