From: Mark Mitchell Date: Thu, 12 Aug 2004 02:51:31 +0000 (+0000) Subject: re PR c++/16717 ([unit-at-a-time] __attribute__((constructor)) broken in C++) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e40af1ab06b897d05a0f980156406ac5635b1e7;p=gcc.git re PR c++/16717 ([unit-at-a-time] __attribute__((constructor)) broken in C++) PR c++/16717 * g++.dg/ext/construct1.C: New test. From-SVN: r85844 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a721a75a093..dd98c39fc03 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-08-11 Mark Mitchell + + PR c++/16717 + * g++.dg/ext/construct1.C: New test. + 2004-08-11 Mark Mitchell PR c++/16853 diff --git a/gcc/testsuite/g++.dg/ext/construct1.C b/gcc/testsuite/g++.dg/ext/construct1.C new file mode 100644 index 00000000000..6a7d8cee403 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/construct1.C @@ -0,0 +1,12 @@ +// PR c++/16717 +// { dg-options "-O2" } + +int i; + +void hello (void) __attribute__ ((constructor)); +void hello (void) { i = 1; } + +int main (void) { + if (i != 1) + return 1; +}