From: Jakub Jelinek Date: Thu, 30 Oct 2008 00:11:23 +0000 (+0100) Subject: re PR debug/36668 (FAIL: g++.dg/other/PR23205.C scan-assembler .stabs.*foobar:c=i) X-Git-Tag: releases/gcc-4.4.0~1893 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63240f9558b74f624a7c70c7b96def553800dd0e;p=thirdparty%2Fgcc.git re PR debug/36668 (FAIL: g++.dg/other/PR23205.C scan-assembler .stabs.*foobar:c=i) PR debug/36668 * g++.dg/other/PR23205.C: Allow foobar to be defined as variable. * g++.dg/other/pr23205-2.C: New test. From-SVN: r141453 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 03a3df90722e..295f8dee00f6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-10-30 Jakub Jelinek + + 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 * 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 6852f82f5ef6..ae2f0b166443 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 000000000000..608108ad9a0d --- /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" } } */