From 1457e85320fa4e01bd0b8db4c9084b81583ad323 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 4 Sep 2010 20:08:02 +0000 Subject: [PATCH] global-used-types-1.C: Replace ".*" by "\[^\n\]*". * g++.dg/debug/dwarf2/global-used-types-1.C: Replace ".*" by "\[^\n\]*". * g++.dg/debug/dwarf2/namespace-1.C: Likewise. * g++.dg/debug/dwarf2/pubnames-1.C: Likewise. * g++.dg/debug/dwarf2/template-func-params-4.C: Likewise. * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise. * g++.dg/debug/dwarf2/template-params-4.C: Likewise. * g++.dg/debug/dwarf2/template-params-6.C: Likewise. * g++.dg/debug/dwarf2/template-params-7.C: Likewise. * g++.dg/debug/dwarf2/typedef1.C: Likewise. * gcc.dg/debug/dwarf2/global-used-types.c: Likewise. * gcc.dg/debug/dwarf2/inline2.c: Likewise. * gcc.target/i386/pr22152.c: Likewise. * gcc.target/i386/pr36992-1.c: Likewise. * gcc.target/i386/pr36992-2.c: Likewise. * gcc.target/sh/sh4a-memmovua.c: Likewise. From-SVN: r163868 --- gcc/testsuite/ChangeLog | 19 +++++++++++++++++++ .../g++.dg/debug/dwarf2/global-used-types-1.C | 8 ++++---- gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C | 8 ++++---- gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C | 10 +++++----- .../g++.dg/debug/dwarf2/template-func-params-4.C | 4 ++-- .../g++.dg/debug/dwarf2/template-func-params-7.C | 18 +++++++++--------- gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C | 4 ++-- gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C | 4 ++-- gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C | 2 +- gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C | 10 +++++----- gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c | 8 ++++---- gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c | 4 ++-- gcc/testsuite/gcc.target/i386/pr22152.c | 2 +- gcc/testsuite/gcc.target/i386/pr36992-1.c | 2 +- gcc/testsuite/gcc.target/i386/pr36992-2.c | 2 +- gcc/testsuite/gcc.target/sh/sh4a-memmovua.c | 2 +- 16 files changed, 63 insertions(+), 44 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 99c1d3e..bb5661b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2010-09-04 Andreas Schwab + + * g++.dg/debug/dwarf2/global-used-types-1.C: Replace ".*" by + "\[^\n\]*". + * g++.dg/debug/dwarf2/namespace-1.C: Likewise. + * g++.dg/debug/dwarf2/pubnames-1.C: Likewise. + * g++.dg/debug/dwarf2/template-func-params-4.C: Likewise. + * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise. + * g++.dg/debug/dwarf2/template-params-4.C: Likewise. + * g++.dg/debug/dwarf2/template-params-6.C: Likewise. + * g++.dg/debug/dwarf2/template-params-7.C: Likewise. + * g++.dg/debug/dwarf2/typedef1.C: Likewise. + * gcc.dg/debug/dwarf2/global-used-types.c: Likewise. + * gcc.dg/debug/dwarf2/inline2.c: Likewise. + * gcc.target/i386/pr22152.c: Likewise. + * gcc.target/i386/pr36992-1.c: Likewise. + * gcc.target/i386/pr36992-2.c: Likewise. + * gcc.target/sh/sh4a-memmovua.c: Likewise. + 2010-09-04 John David Anglin PR testsuite/43957 diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C index bad08ed..69b5647 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C @@ -1,10 +1,10 @@ // Contributed by Dodji Seketeli // { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-do compile } -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_enumeration_type" 1 } } -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_enumerator" 2 } } -// { dg-final { scan-assembler-times "ascii \"a.0\"\[\t \]+.*?DW_AT_name" 1 } } -// { dg-final { scan-assembler-times "ascii \"b.0\"\[\t \]+.*?DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } } +// { dg-final { scan-assembler-times "ascii \"a.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "ascii \"b.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } } struct foo { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C index 9b00453..6137125 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C @@ -5,10 +5,10 @@ // We want to test that there is a DW_TAG_namespace DIE DW_AT_name is set // to "not_emitted". That namespace die has a child DW_TAG_typedef DIE // which DW_AT_name is the null terminated string "T". -// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_namespace" 1 } } -// { dg-final { scan-assembler-times "\"not_emitted.0\".*?DW_AT_name" 1 } } -// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_typedef" 1 } } -// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DIE +\\(\[^\n\]*\\) DW_TAG_namespace" 1 } } +// { dg-final { scan-assembler-times "\"not_emitted.0\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DIE +\\(\[^\n\]*\\) DW_TAG_typedef" 1 } } +// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } } struct strukt { diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C index 18d1df0..8884842 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C @@ -8,13 +8,13 @@ // debug_pubnames section. The assembly code of that label adds an occurence // of section declaration assembly. So on Darwin, we need to check for two // occurences of the debug_pubnames section declaration. -// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 1 { target { ! *-*-darwin* } } } } -// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 2 { target { *-*-darwin* } } } } +// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 { target { ! *-*-darwin* } } } } +// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 2 { target { *-*-darwin* } } } } // // Then check of the presence of the names we are interested in. -// { dg-final { scan-assembler-times "\"main.0\".*external name" 1 } } -// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } } -// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } } +// { dg-final { scan-assembler-times "\"main.0\"\[^\n\]*external name" 1 } } +// { dg-final { scan-assembler-times "\"ns::ns_x\[^\n\]*external name" 1 } } +// { dg-final { scan-assembler-times "\"y::y_x\[^\n\]*external name" 1 } } namespace ns { int ns_x; } class y { public: static int y_x; }; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C index 45b0cf8..85401b2 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C @@ -9,8 +9,8 @@ // DW_TAG_GNU_template_parameter_pack DIE, but in practise, there is only one // DW_TAG_GNU_template_parameter_pack as there is only count // is emitted. -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 1} } -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 3} } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_GNU_template_parameter_pack" 1} } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_template_type_param" 3} } template struct count; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C index a19217c..fc82dce 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C @@ -6,23 +6,23 @@ // There must be 5 subprograms generated: // printf(const char*), printf, // printf, printf and foo(). -// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_subprogram" 5 } } +// { dg-final {scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_subprogram" 5 } } // That makes 6 template type parameters. -// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 6 } } -// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } } -// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } } -// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } } -// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_template_type_param" 6 } } +// { dg-final {scan-assembler-times "\"printf.0\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"printf.0\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"printf.0\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final {scan-assembler-times "\"printf.0\"\[^\n\]*DW_AT_name" 1 } } // printf and printf have a pack expansion as // function parameters. There should then be 3 // DW_TAG_GNU_template_parameter_pack and 3 DW_TAG_GNU_formal_parameter_pack DIEs -// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 3 } } -// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_formal_parameter_pack" 3 } } +// { dg-final {scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_GNU_template_parameter_pack" 3 } } +// { dg-final {scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_GNU_formal_parameter_pack" 3 } } // These 3 function template instantiations has a total of 3 template // parameters named T. -// { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } } +// { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+\[^\n\]*DW_AT_name" 3 } } void diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C index 09e85cb..a0ca613 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C @@ -9,8 +9,8 @@ // DW_TAG_GNU_template_parameter_pack DIE, but in practise, there is only one // DW_TAG_GNU_template_parameter_pack as there is only count // is emitted. -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 1} } -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 3} } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_GNU_template_parameter_pack" 1} } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_template_type_param" 3} } template struct count; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C index 184a90f..06cdef5 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C @@ -2,8 +2,8 @@ // Origin PR debug/30161 // { dg-options "-g -dA -fno-merge-debug-strings" } // { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } } -// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } } -// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "\"vector.0\"\[^\n\]*DW_AT_GNU_template_name" 1 } } +// { dg-final { scan-assembler-times ".ascii \"U.0\"\[^\n\]*DW_AT_name" 1 } } template struct vector_base diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C index d021d96..2b39359 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C @@ -5,7 +5,7 @@ // The type M<> should have one DW_TAG_GNU_template_parameter_pack DIE, // with no DW_AT_name attribute. We don't test the fact that it has no // DW_AT_name though. -// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 1 } } +// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_GNU_template_parameter_pack" 1 } } template diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C index b3a0f93..6f7aac3 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C @@ -3,12 +3,12 @@ // { dg-options "-g -dA" } // { dg-do compile } // { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } } -// { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\".*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\"\[^\n\]*DW_AT_name" 1 } } // { dg-final { scan-assembler-times "DW_TAG_enumeration_type" 2 } } -// { dg-final { scan-assembler-times "DW_AT_name: \"typedef foo<1u>::type type\"|\"typedef foo<1u>::type type..\".*DW_AT_name" 1 } } -// { dg-final { scan-assembler-times "DIE (.*) DW_TAG_enumeration_type" 2 } } -// { dg-final { scan-assembler-times "\"e0..\".*DW_AT_name" 1 } } -// { dg-final { scan-assembler-times "\"e1..\".*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DW_AT_name: \"typedef foo<1u>::type type\"|\"typedef foo<1u>::type type..\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_enumeration_type" 2 } } +// { dg-final { scan-assembler-times "\"e0..\"\[^\n\]*DW_AT_name" 1 } } +// { dg-final { scan-assembler-times "\"e1..\"\[^\n\]*DW_AT_name" 1 } } template struct foo diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c index 1c2d403..54fa58a 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c @@ -2,10 +2,10 @@ Contributed by Dodji Seketeli { dg-options "-g -dA -fno-merge-debug-strings" } { dg-do compile } - { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_enumeration_type" 1 } } - { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_enumerator" 2 } } - { dg-final { scan-assembler-times "ascii \"a.0\"\[\t \]+.*?DW_AT_name" 1 } } - { dg-final { scan-assembler-times "ascii \"b.0\"\[\t \]+.*?DW_AT_name" 1 } } + { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } } + { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } } + { dg-final { scan-assembler-times "ascii \"a.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } } + { dg-final { scan-assembler-times "ascii \"b.0\"\[\t \]+\[^\n\]*DW_AT_name" 1 } } */ enum { a, b }; diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c index 06d1b59..20edb58 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c @@ -21,14 +21,14 @@ - One for each subroutine inlined into main, that's 3. - One for earch subroutine inline into the out of line instances of third, second and first. */ -/* { dg-final { scan-assembler-times "\\(DIE \\(.*?\\) DW_TAG_inlined_subroutine" 6 } } */ +/* { dg-final { scan-assembler-times "\\(DIE \\(\[^\n\]*\\) DW_TAG_inlined_subroutine" 6 } } */ /* Likewise we should have 6 DW_TAG_lexical_block DIEs: - One for each subroutine inlined into main, so that's 3. - One for each subroutine inlined in the out of line instances of third, second and first, that's 3. */ -/* { dg-final { scan-assembler-times "\\(DIE \\(.*?\\) DW_TAG_lexical_block" 6 } } */ +/* { dg-final { scan-assembler-times "\\(DIE \\(\[^\n\]*\\) DW_TAG_lexical_block" 6 } } */ /* There are 3 DW_AT_inline attributes: one per abstract inline instance. diff --git a/gcc/testsuite/gcc.target/i386/pr22152.c b/gcc/testsuite/gcc.target/i386/pr22152.c index d125977..679a358 100644 --- a/gcc/testsuite/gcc.target/i386/pr22152.c +++ b/gcc/testsuite/gcc.target/i386/pr22152.c @@ -15,4 +15,4 @@ unsigned_add3 (const __m64 * a, const __m64 * b, unsigned long count) return sum; } -/* { dg-final { scan-assembler-times "movq\[ \\t\]+.*%mm" 1 } } */ +/* { dg-final { scan-assembler-times "movq\[ \\t\]+\[^\n\]*%mm" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr36992-1.c b/gcc/testsuite/gcc.target/i386/pr36992-1.c index 7cd24cc..345c1f2 100644 --- a/gcc/testsuite/gcc.target/i386/pr36992-1.c +++ b/gcc/testsuite/gcc.target/i386/pr36992-1.c @@ -9,4 +9,4 @@ test (__m128i b) return _mm_move_epi64 (b); } -/* { dg-final { scan-assembler-times "movq\[ \\t\]+.*%xmm" 1 } } */ +/* { dg-final { scan-assembler-times "movq\[ \\t\]+\[^\n\]*%xmm" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr36992-2.c b/gcc/testsuite/gcc.target/i386/pr36992-2.c index 17696a5..25ff34b 100644 --- a/gcc/testsuite/gcc.target/i386/pr36992-2.c +++ b/gcc/testsuite/gcc.target/i386/pr36992-2.c @@ -9,4 +9,4 @@ test (__m128i b) return _mm_move_epi64 (b); } -/* { dg-final { scan-assembler-times "movq\[ \\t\]+.*%xmm" 1 } } */ +/* { dg-final { scan-assembler-times "movq\[ \\t\]+\[^\n\]*%xmm" 1 } } */ diff --git a/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c b/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c index ec5c0bd..359dd8f 100644 --- a/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c +++ b/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c @@ -2,7 +2,7 @@ 32-bit-aligned addresses. */ /* { dg-do compile { target "sh*-*-*" } } */ /* { dg-options "-O" } */ -/* { dg-final { scan-assembler-times "\tmovua\\.l\t(.*)+" 2 } } */ +/* { dg-final { scan-assembler-times "\tmovua\\.l\t" 2 } } */ #ifdef __SH4A__ #include -- 2.7.4