[testsuite] new C++ test
Peter Bienstman
Peter.Bienstman@rug.ac.be
Sun Jan 7 04:03:00 GMT 2001
Hi,
The following is an attempt to add a test for PR 1029 to the testsuite.
Is this OK for someone to install?
Thanks,
Peter
Index: gcc/testsuite/ChangeLog
from Peter Bienstman <Peter.Bienstman@rug.ac.be>
* g++.old-deja/g++.other/crash39.C: New test.
diff -c3pNr gcc_OLD/gcc/gcc/testsuite/g++.old-deja/g++.other/crash39.C
gcc_NEW/gcc/gcc/testsuite/g++.old-deja/g++.other/crash39.C
*** gcc_OLD/gcc/gcc/testsuite/g++.old-deja/g++.other/crash39.C Thu Jan 1
01:00:00 1970
--- gcc_NEW/gcc/gcc/testsuite/g++.old-deja/g++.other/crash39.C Sun Jan 7
12:41:00 2001
***************
*** 0 ****
--- 1,37 ----
+ // Build don't run:
+ // Special g++ Options: -O3
+
+ // Based on GNATS PR 1029
+
+ struct A {};
+
+ struct B
+ {
+ B(A&);
+ };
+
+ struct C
+ {
+ void f(const B&);
+ void g(const B&);
+ };
+
+ void C::g(const B& b)
+ {
+ A* a;
+ f(B(*a));
+ }
+
+ B::B(A& a) {}
+
+ void operator+(const B& b1, const B& b2)
+ {
+ C c;
+ A* a;
+ c.f(B(*a));
+ }
+
+ int main()
+ {
+ return 0;
+ }
-------------------------------------
Peter Bienstman
Department of Information Technology
INTEC/IMEC - Ghent University
St.-Pietersnieuwstraat 41
B-9000 Gent - Belgium
E-mail: Peter.Bienstman@rug.ac.be
Tel: +32 9 264 3445
Fax: +32 9 264 3593
-------------------------------------
More information about the Gcc-patches
mailing list