From: Marek Polacek Date: Wed, 11 May 2016 17:09:43 +0000 (+0000) Subject: attr-opt-1.c: Move to c-c++-common/. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c74f63ff5d8af9b0c994302b944f3a8dd25d1de;p=gcc.git attr-opt-1.c: Move to c-c++-common/. * gcc.dg/attr-opt-1.c: Move to c-c++-common/. * gcc.dg/pr18079-2.c: Remove file. From-SVN: r236130 --- diff --git a/gcc/testsuite/c-c++-common/attr-opt-1.c b/gcc/testsuite/c-c++-common/attr-opt-1.c new file mode 100644 index 00000000000..fc9b4a691b5 --- /dev/null +++ b/gcc/testsuite/c-c++-common/attr-opt-1.c @@ -0,0 +1,37 @@ +/* PR c/70255 */ +/* { dg-do compile } */ + +double +fn1 (double h, double l) /* { dg-message "previous definition" } */ +{ + return h + l; +} +double fn1 (double, double) __attribute__ ((optimize ("no-associative-math"))); /* { dg-warning "optimization attribute" } */ + +__attribute__ ((optimize ("no-associative-math"))) double +fn2 (double h, double l) +{ + return h + l; +} +double fn2 (double, double) __attribute__ ((optimize ("no-associative-math"))); + +__attribute__ ((optimize ("no-associative-math"))) double +fn3 (double h, double l) /* { dg-message "previous definition" } */ +{ + return h + l; +} +double fn3 (double, double) __attribute__ ((optimize ("O2,no-associative-math"))); /* { dg-warning "optimization attribute" } */ + +__attribute__ ((optimize ("no-associative-math,O2"))) double +fn4 (double h, double l) /* { dg-message "previous definition" } */ +{ + return h + l; +} +double fn4 (double, double) __attribute__ ((optimize ("O2,no-associative-math"))); /* { dg-warning "optimization attribute" } */ + +__attribute__ ((optimize ("no-reciprocal-math"), optimize ("no-associative-math"))) int +fn5 (void) +{ + return 0; +} +int __attribute__ ((optimize ("no-associative-math"), optimize ("no-reciprocal-math"))) fn5 (void); diff --git a/gcc/testsuite/gcc.dg/attr-opt-1.c b/gcc/testsuite/gcc.dg/attr-opt-1.c deleted file mode 100644 index 4140fda7a2a..00000000000 --- a/gcc/testsuite/gcc.dg/attr-opt-1.c +++ /dev/null @@ -1,37 +0,0 @@ -/* PR c/70255 */ -/* { dg-do compile } */ - -double -fn1 (double h, double l) /* { dg-message "previous definition" } */ -{ - return h + l; -} -double fn1 (double, double) __attribute__ ((optimize ("no-associative-math"))); /* { dg-warning "optimization attribute on .fn1. follows definition" } */ - -__attribute__ ((optimize ("no-associative-math"))) double -fn2 (double h, double l) -{ - return h + l; -} -double fn2 (double, double) __attribute__ ((optimize ("no-associative-math"))); - -__attribute__ ((optimize ("no-associative-math"))) double -fn3 (double h, double l) /* { dg-message "previous definition" } */ -{ - return h + l; -} -double fn3 (double, double) __attribute__ ((optimize ("O2,no-associative-math"))); /* { dg-warning "optimization attribute on .fn3. follows definition" } */ - -__attribute__ ((optimize ("no-associative-math,O2"))) double -fn4 (double h, double l) /* { dg-message "previous definition" } */ -{ - return h + l; -} -double fn4 (double, double) __attribute__ ((optimize ("O2,no-associative-math"))); /* { dg-warning "optimization attribute on .fn4. follows definition" } */ - -__attribute__ ((optimize ("no-reciprocal-math"), optimize ("no-associative-math"))) int -fn5 (void) -{ - return 0; -} -int __attribute__ ((optimize ("no-associative-math"), optimize ("no-reciprocal-math"))) fn5 (void); diff --git a/gcc/testsuite/gcc.dg/pr18079-2.c b/gcc/testsuite/gcc.dg/pr18079-2.c deleted file mode 100644 index 2c83b701e10..00000000000 --- a/gcc/testsuite/gcc.dg/pr18079-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* PR c/18079 */ -/* { dg-do compile } */ -/* { dg-options "-Wall" } */ - -__attribute__ ((always_inline)) void fndecl1 (void); -__attribute__ ((noinline)) void fndecl1 (void); /* { dg-warning "attribute 'noinline' follows declaration with attribute 'always_inline'" } */ - -__attribute__ ((noinline)) void fndecl2 (void); -__attribute__ ((always_inline)) void fndecl2 (void); /* { dg-warning "attribute 'always_inline' follows declaration with attribute 'noinline'" } */ - - -__attribute__ ((hot)) void fndecl3 (void); -__attribute__ ((cold)) void fndecl3 (void); /* { dg-warning "attribute 'cold' follows declaration with attribute 'hot'" } */ - -__attribute__ ((cold)) void fndecl4 (void); -__attribute__ ((hot)) void fndecl4 (void); /* { dg-warning "attribute 'hot' follows declaration with attribute 'cold'" } */