diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/const.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/const.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/const.C b/gcc/testsuite/g++.old-deja/g++.jason/const.C new file mode 100644 index 000000000..7c497ee99 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/const.C @@ -0,0 +1,17 @@ +// { dg-do run } +// Bug: a ends up in the text segment, so trying to initialize it causes +// a seg fault. + +struct A { + int i; + A(): i(0) {} + A(int j): i(j) {} +}; + +const A a; +const A b(1); + +int main () +{ + return 0; +} |