FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb132.C
bloba7f4159392d5eed546eabf00b0b23c51c07c52d2
1 // Build don't link:
2 // From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de> 
3 // Reported against EGCS snaps 98/06/28.
4 // Special g++ Options: -O -Wall  -fgcse -frerun-loop-opt
5 //
6 // Compilation of this program with the flags g++ -Wall -O -fgcse
7 // -frerun-loop-opt or -O2 produces spurious warnings in the standard
8 // header <std/bastring.h>.
9 //
10 // They vanish if the declaration of a::b is taken out.
12 #include <string>
14 std::string foo();
15 struct a {
16         void bar();
17         enum b { c, d };
18         b theb;
19         std::string baz;
22 void
23 a::bar()
25         baz += foo() + foo();
26         baz += foo() + foo() + "foo";