New tests from Klaus-Georg.
From-SVN: r20818
This commit is contained in:
parent
a6fa642003
commit
2d4b533de4
2 changed files with 43 additions and 0 deletions
27
gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
Normal file
27
gcc/testsuite/g++.old-deja/g++.robertl/eb132.C
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Build don't link
|
||||
// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
|
||||
// Reported against EGCS snaps 98/06/28.
|
||||
// Special g++ Options: -O -Wall -fgcse -frerun-loop-opt
|
||||
//
|
||||
// Compilation of this program with the flags g++ -Wall -O -fgcse -frerun-loop-opt
|
||||
// or -O2 produces spurious warnings in the standard header <std/bastring.h>.
|
||||
//
|
||||
// They vanish if the declaration of a::b is taken out.
|
||||
|
||||
#include <string>
|
||||
|
||||
string foo();
|
||||
struct a {
|
||||
void bar();
|
||||
enum b { c, d };
|
||||
b theb;
|
||||
string baz;
|
||||
};
|
||||
|
||||
void
|
||||
a::bar()
|
||||
{
|
||||
baz += foo() + foo();
|
||||
baz += foo() + foo() + "foo";
|
||||
}
|
||||
|
16
gcc/testsuite/g++.old-deja/g++.robertl/eb133.C
Normal file
16
gcc/testsuite/g++.old-deja/g++.robertl/eb133.C
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Build don't link
|
||||
// Gives ICE 109
|
||||
// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
|
||||
// Reported against EGCS snaps 98/06/28.
|
||||
|
||||
int main()
|
||||
{
|
||||
try {
|
||||
}
|
||||
catch (bad_alloc) { // ERROR - parse error
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue