The new g++.dg/abi/anon2.C test currently causes lots of noise in mail-report.log:
UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler .weak(_definition)?[ \\t]_?_ZN2N11D1C3fn1ENS0_1BE UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler .weak(_definition)?[ \\t]_?_ZN2N11D1C3fn2ES1_ UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler-not .weak(_definition)?[ \\t]_?_ZN2N23._31C3fn1ENS0_1BE UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler-not .weak(_definition)?[ \\t]_?_ZN2N23._31C3fn2ES1_ UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler .weak(_definition)?[ \\t]_?_ZN2N31D1CIiE3fn1ENS0_1BE UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler .weak(_definition)?[ \\t]_?_ZN2N31D1CIiE3fn2ES2_ UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler-not .weak(_definition)?[ \\t]_?_ZN2N43._91CIiE3fn1ENS0_1BE UNRESOLVED: g++.dg/abi/anon2.C -std=c++98 scan-assembler-not .weak(_definition)?[ \\t]_?_ZN2N43._91CIiE3fn2ES2_ Since the file doesn't compile with -std=c++98, the assembler scans should be restricted to ! c++98. The following patch does just that. Tested with the appropriate runtest invocations on i386-pc-solaris2.11 and x86_64-unknown-linux-gnu. Ok for mainline? Rainer 2014-03-03 Rainer Orth <r...@cebitec.uni-bielefeld.de> * g++.dg/abi/anon2.C: Don't scan assembler for c++98.
# HG changeset patch # Parent eb8ef98d9271199f43ddfa3c64f85f2fda1adddd Fix g++.dg/abi/anon2.C with -std=c++98 diff --git a/gcc/testsuite/g++.dg/abi/anon2.C b/gcc/testsuite/g++.dg/abi/anon2.C --- a/gcc/testsuite/g++.dg/abi/anon2.C +++ b/gcc/testsuite/g++.dg/abi/anon2.C @@ -6,9 +6,9 @@ namespace N1 { typedef enum { X, Y } A; typedef struct { } B; struct C { - // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N11D1C3fn1ENS0_1BE" } } + // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N11D1C3fn1ENS0_1BE" { target { ! c++98 } } } } static void fn1 (B) { } - // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N11D1C3fn2ES1_" } } + // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N11D1C3fn2ES1_" { target { ! c++98 } } } } static void fn2 (C) { } }; } D; @@ -22,9 +22,9 @@ namespace N2 { typedef enum { X, Y } A; typedef struct { } B; struct C { - // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N23._31C3fn1ENS0_1BE" } } + // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N23._31C3fn1ENS0_1BE" { target { ! c++98 } } } } static void fn1 (B) { } // { dg-error "no linkage" "" { target c++98 } } - // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N23._31C3fn2ES1_" } } + // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N23._31C3fn2ES1_" { target { ! c++98 } } } } static void fn2 (C) { } // { dg-error "no linkage" "" { target c++98 } } }; } const D; @@ -38,9 +38,9 @@ namespace N3 { typedef enum { X, Y } A; typedef struct { } B; template <class T> struct C { - // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N31D1CIiE3fn1ENS0_1BE" } } + // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N31D1CIiE3fn1ENS0_1BE" { target { ! c++98 } } } } static void fn1 (B) { } - // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N31D1CIiE3fn2ES2_" } } + // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N31D1CIiE3fn2ES2_" { target { ! c++98 } } } } static void fn2 (C) { } }; } D; @@ -54,9 +54,9 @@ namespace N4 { typedef enum { X, Y } A; typedef struct { } B; template <class T> struct C { - // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N43._91CIiE3fn1ENS0_1BE" } } + // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N43._91CIiE3fn1ENS0_1BE" { target { ! c++98 } } } } static void fn1 (B) { } // { not-dg-error "no linkage" "" { target c++98 } } - // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N43._91CIiE3fn2ES2_" } } + // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N43._91CIiE3fn2ES2_" { target { ! c++98 } } } } static void fn2 (C) { } // { not-dg-error "no linkage" "" { target c++98 } } }; } const D;
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University