Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.bugs/900324_05.C

raw
1 // { dg-do assemble }
2 // g++ 1.37.1 bug 900324_05
3
4 // The following erroneous code causes g++ to segfault.
5
6 // Cfront 2.0 passes this test.
7
8 // keywords: segfault, arrays, references, assignment operator=
9
10 typedef int int_array[];
11
12 extern int_array int_array_object;
13
14 int_array &left = int_array_object;
15 int_array &right = int_array_object;
16
17 void function ()
18 {
19 left = right; // { dg-error "" } causes segfault
20 }
21
22 int main () { return 0; }