diff options
| author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-10-30 00:11:23 +0000 |
|---|---|---|
| committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-10-30 00:11:23 +0000 |
| commit | 0460ce46c800055b06ffade26a57acf73262fabf (patch) | |
| tree | 2885028f2b20b99c3e72809ff7f0525c5222a09f | |
| parent | 741c2f868c34be4cac94daa0630a5dbe23df5457 (diff) | |
| download | ppe42-gcc-0460ce46c800055b06ffade26a57acf73262fabf.tar.gz ppe42-gcc-0460ce46c800055b06ffade26a57acf73262fabf.zip | |
PR debug/36668
* g++.dg/other/PR23205.C: Allow foobar to be defined as variable.
* g++.dg/other/pr23205-2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141453 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/other/PR23205.C | 2 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/other/pr23205-2.C | 18 |
3 files changed, 25 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 03a3df90722..295f8dee00f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-10-30 Jakub Jelinek <jakub@redhat.com> + + PR debug/36668 + * g++.dg/other/PR23205.C: Allow foobar to be defined as variable. + * g++.dg/other/pr23205-2.C: New test. + 2008-10-29 David Edelsohn <edelsohn@gnu.org> * gcc.c-torture/compile/pr37878.c: New test. diff --git a/gcc/testsuite/g++.dg/other/PR23205.C b/gcc/testsuite/g++.dg/other/PR23205.C index 6852f82f5ef..ae2f0b16644 100644 --- a/gcc/testsuite/g++.dg/other/PR23205.C +++ b/gcc/testsuite/g++.dg/other/PR23205.C @@ -15,4 +15,4 @@ int main() return i; } -/* { dg-final { scan-assembler ".stabs.*foobar:c=i" } } */ +/* { dg-final { scan-assembler ".stabs.*foobar:(c=i|S)" } } */ diff --git a/gcc/testsuite/g++.dg/other/pr23205-2.C b/gcc/testsuite/g++.dg/other/pr23205-2.C new file mode 100644 index 00000000000..608108ad9a0 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr23205-2.C @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* *-*-netware* alpha*-*-* hppa*64*-*-* ia64-*-* } { "*" } { "" } } */ +/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */ + +const int foobar = 4; +int foo () +{ + return foobar + 1; +} + +int main() +{ + int i; + i = foo(); + return i; +} + +/* { dg-final { scan-assembler ".stabs.*foobar:c=i" } } */ |

