mirror of git://gcc.gnu.org/git/gcc.git
target-supports.exp (check_named_sections_available): New.
* lib/target-supports.exp (check_named_sections_available): New. * lib/gcc-dg.exp (dg-require-named-sections): New. * lib/prune.exp (prune_gcc_output): Incorporate prunes from old-deja.exp. Also prune error-count message from HP linker. * g++.old-deja/old-deja.exp (g++-dg-prune): Delete. * g++.dg/init/init-ref4.C: Use dg-require-weak. * g++.old-deja/g++.pt/static3.C: Likewise. * g++.dg/parse/attr-ctor1.C: Use dg-require-named-sections. From-SVN: r80572
This commit is contained in:
parent
7c3ac422e4
commit
ab37d57e9c
|
@ -1,3 +1,15 @@
|
|||
2004-04-09 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* lib/target-supports.exp (check_named_sections_available): New.
|
||||
* lib/gcc-dg.exp (dg-require-named-sections): New.
|
||||
* lib/prune.exp (prune_gcc_output): Incorporate prunes from
|
||||
old-deja.exp. Also prune error-count message from HP linker.
|
||||
* g++.old-deja/old-deja.exp (g++-dg-prune): Delete.
|
||||
|
||||
* g++.dg/init/init-ref4.C: Use dg-require-weak.
|
||||
* g++.old-deja/g++.pt/static3.C: Likewise.
|
||||
* g++.dg/parse/attr-ctor1.C: Use dg-require-named-sections.
|
||||
|
||||
2004-04-09 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* gcc.c-torture/execute/20040409-1.c: New test case.
|
||||
|
@ -49,7 +61,7 @@
|
|||
* gcc.dg/compat/struct-by-value-5a_y.c,
|
||||
gcc.dg/compat/struct-by-value-5b_y.c: New, split out from
|
||||
gcc.dg/compat/struct-by-value-5_y.c.
|
||||
|
||||
|
||||
* gcc.dg/compat/struct-by-value-6a_main.c,
|
||||
gcc.dg/compat/struct-by-value-6b_main.c: New files.
|
||||
* gcc.dg/compat/struct-by-value-6_main.c: Delete.
|
||||
|
@ -59,7 +71,7 @@
|
|||
* gcc.dg/compat/struct-by-value-6a_y.c,
|
||||
gcc.dg/compat/struct-by-value-6b_y.c: New, split out from
|
||||
gcc.dg/compat/struct-by-value-6_y.c.
|
||||
|
||||
|
||||
* gcc.dg/compat/struct-by-value-7a_main.c,
|
||||
gcc.dg/compat/struct-by-value-7b_main.c: New files.
|
||||
* gcc.dg/compat/struct-by-value-7_main.c: Delete.
|
||||
|
@ -92,7 +104,7 @@
|
|||
failure and exit(0) on success.
|
||||
* g++.dg/expr/anew2.C: Ditto.
|
||||
* g++.dg/expr/anew3.C: Ditto.
|
||||
* g++.dg/expr/anew4.C: Ditto.
|
||||
* g++.dg/expr/anew4.C: Ditto.
|
||||
|
||||
2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Origin: dgregor@gcc.gnu.org
|
||||
// PR c++/11384
|
||||
// foo<int>::_S_something was not being emitted.
|
||||
// foo<int>::_S_something was not being emitted (as a weak definition).
|
||||
|
||||
// { dg-do run { xfail *-*-aout *-*-coff *-*-hpux* *-*-hms } }
|
||||
// On targets that don't support weak symbols, we require an explicit
|
||||
// { dg-do run }
|
||||
// { dg-require-weak "" }
|
||||
|
||||
template<typename T>
|
||||
struct foo
|
||||
|
@ -19,4 +19,3 @@ int main()
|
|||
const int* p = &foo<int>::_S_something;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
// PR c++/6992
|
||||
// Origin: <petr@scssoft.com>
|
||||
// { dg-do compile }
|
||||
|
||||
// Requires section attribute support
|
||||
// { dg-require-named-sections "" }
|
||||
|
||||
class A
|
||||
{
|
||||
__attribute__((section("whatever"))) A(); // { dg-bogus "" "" { xfail hppa*-*-hpux* } }
|
||||
__attribute__((section("whatever"))) A();
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// { dg-do run { xfail *-*-aout *-*-coff *-*-hpux* *-*-hms } }
|
||||
// { dg-do run }
|
||||
// On targets that don't support weak symbols, we require an explicit
|
||||
// instantiation of arr.
|
||||
// { dg-require-weak "" }
|
||||
|
||||
template<class T>
|
||||
struct A {
|
||||
|
|
|
@ -30,17 +30,6 @@ dg-init
|
|||
# that are handled specially.
|
||||
set tests [lsort [find $srcdir/$subdir *.C]]
|
||||
|
||||
proc g++-dg-prune { system text } {
|
||||
regsub -all "(^|\n)\[^\n\]*: In (\[^\n\]*function|method|\[^\n\]*structor) \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*: In instantiation of \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*: instantiated from \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*: At (top level|global scope):\[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
|
||||
regsub -all "(^|\n)collect: re(compiling|linking)\[^\n\]*" $text "" text
|
||||
return $text
|
||||
}
|
||||
|
||||
# Main loop.
|
||||
dg-runtest $tests "" $DEFAULT_CXXFLAGS
|
||||
|
||||
|
|
|
@ -357,6 +357,17 @@ proc dg-require-iconv { args } {
|
|||
return
|
||||
}
|
||||
|
||||
# If this target does not support named sections skip this test.
|
||||
|
||||
proc dg-require-named-sections { args } {
|
||||
upvar name name
|
||||
|
||||
if { ![ check_named_sections_available ] } {
|
||||
upvar dg-do-what dg-do-what
|
||||
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
|
||||
}
|
||||
}
|
||||
|
||||
# Prune any messages matching ARGS[1] (a regexp) from test output.
|
||||
proc dg-prune-output { args } {
|
||||
global additional_prunes
|
||||
|
|
|
@ -19,10 +19,13 @@
|
|||
proc prune_gcc_output { text } {
|
||||
#send_user "Before:$text\n"
|
||||
|
||||
regsub -all "(^|\n)\[^\n\]*: In ((static member )?function|member|method|(copy )?constructor|instantiation|program|subroutine|block-data) \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*: In ((static member )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data) \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*: At (top level|global scope):\[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[^\n\]*: instantiated from \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)collect2: ld returned \[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)collect: re(compiling|linking)\[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
|
||||
regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
|
||||
|
||||
# Ignore harmless -fpic warnings.
|
||||
regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC) ignored for target\[^\n\]*" $text "" text
|
||||
|
|
|
@ -247,3 +247,23 @@ proc check_iconv_available { test_what } {
|
|||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Return true if named sections are supported on this target.
|
||||
# This proc does not cache results, because the answer may vary
|
||||
# when cycling over subtarget options (e.g. irix o32/n32/n64) in
|
||||
# the same test run.
|
||||
proc check_named_sections_available { } {
|
||||
global tool
|
||||
|
||||
set f [open "tmp.c" "w"]
|
||||
# Compile a small test program.
|
||||
puts $f "int __attribute__ ((section(\"whatever\"))) foo;"
|
||||
close $f
|
||||
set lines [${tool}_target_compile "tmp.c" "tmp.o" object ""]
|
||||
file delete "tmp.c"
|
||||
|
||||
# If we got no error messages, everything is OK.
|
||||
set answer [string match "" $lines]
|
||||
verbose "check_named_sections_available returning $answer" 2
|
||||
return $answer
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue