Message ID | 20100914101611.GA8313@bromo.med.uc.edu |
---|---|
State | New |
Headers | show |
On Tue, Sep 14, 2010 at 12:16 PM, Jack Howarth <howarth@bromo.med.uc.edu> wrote: > Currently on targets like darwin which lack weak alias support in their > object format, the gcc.dg/attr-ifunc-1.c and g++.dg/ext/attr-ifunc-1.C produce > UNRESOLVED testsuite results... > > Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/ -c -m32 -o ifunc94739.o ifunc94739.c (timeout = 300) > ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M > compiler exited with status 1 > output is: > ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M > > UNRESOLVED: gcc.dg/attr-ifunc-1.c > UNSUPPORTED: gcc.dg/attr-ifunc-1.c > UNRESOLVED: gcc.dg/attr-ifunc-2.c > UNSUPPORTED: gcc.dg/attr-ifunc-2.c > UNRESOLVED: gcc.dg/attr-ifunc-3.c > UNSUPPORTED: gcc.dg/attr-ifunc-3.c > UNRESOLVED: gcc.dg/attr-ifunc-4.c > UNSUPPORTED: gcc.dg/attr-ifunc-4.c > UNRESOLVED: gcc.dg/attr-ifunc-5.c > UNSUPPORTED: gcc.dg/attr-ifunc-5.c > > These can be properly eliminated by the addition of a dg-require-weak and a dg-require-alias > in each testcase. Tested on x86_64-apple-darwin10. Okay for gcc trunk? No - somehow dg-require-ifunc does not work. Richard. > Jack > > 2010-09-14 Jack Howarth <howarth@bromo.med.uc.edu> > > * gcc.dg/attr-ifunc-1.c: Add dg-require-weak and dg-require-alias. > * g++.dg/ext/attr-ifunc-1.C: Likewise. > > Index: gcc/testsuite/gcc.dg/attr-ifunc-1.c > =================================================================== > --- gcc/testsuite/gcc.dg/attr-ifunc-1.c (revision 164270) > +++ gcc/testsuite/gcc.dg/attr-ifunc-1.c (working copy) > @@ -1,5 +1,7 @@ > /* { dg-do run } */ > /* { dg-require-ifunc "" } */ > +/* { dg-require-weak "" } */ > +/* { dg-require-alias "" } */ > /* { dg-options "" } */ > > #include <stdio.h> > Index: gcc/testsuite/g++.dg/ext/attr-ifunc-1.C > =================================================================== > --- gcc/testsuite/g++.dg/ext/attr-ifunc-1.C (revision 164270) > +++ gcc/testsuite/g++.dg/ext/attr-ifunc-1.C (working copy) > @@ -1,5 +1,7 @@ > /* { dg-do run } */ > /* { dg-require-ifunc "" } */ > +/* { dg-require-weak "" } */ > +/* { dg-require-alias "" } */ > /* { dg-options "-Wno-pmf-conversions" } */ > > #include <stdio.h> >
Unfortunately this patch is incomplete. The UNRESOLVED still occur in... Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/ -c -m32 -o ifunc97992.o ifunc97992.c (timeout = 300) ifunc97992.c:5:18: error: only weak aliases are supported in this configuration compiler exited with status 1 output is: ifunc97992.c:5:18: error: only weak aliases are supported in this configuration UNRESOLVED: gcc.dg/attr-ifunc-1.c despite the presence of the dg-require-weak and dg-require-alias in the testcase. Also these need to be expanded to cover gcc.dg/attr-ifunc-[1,5].c as well as g++.dg/ext/attr-ifunc-[1,4].C. Perhaps these checks need to be done in lib/target-supports.exp. Jack On Tue, Sep 14, 2010 at 06:16:11AM -0400, Jack Howarth wrote: > Currently on targets like darwin which lack weak alias support in their > object format, the gcc.dg/attr-ifunc-1.c and g++.dg/ext/attr-ifunc-1.C produce > UNRESOLVED testsuite results... > > Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/ -c -m32 -o ifunc94739.o ifunc94739.c (timeout = 300) > ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M > compiler exited with status 1 > output is: > ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M > > UNRESOLVED: gcc.dg/attr-ifunc-1.c > UNSUPPORTED: gcc.dg/attr-ifunc-1.c > UNRESOLVED: gcc.dg/attr-ifunc-2.c > UNSUPPORTED: gcc.dg/attr-ifunc-2.c > UNRESOLVED: gcc.dg/attr-ifunc-3.c > UNSUPPORTED: gcc.dg/attr-ifunc-3.c > UNRESOLVED: gcc.dg/attr-ifunc-4.c > UNSUPPORTED: gcc.dg/attr-ifunc-4.c > UNRESOLVED: gcc.dg/attr-ifunc-5.c > UNSUPPORTED: gcc.dg/attr-ifunc-5.c > > These can be properly eliminated by the addition of a dg-require-weak and a dg-require-alias > in each testcase. Tested on x86_64-apple-darwin10. Okay for gcc trunk? > Jack > > 2010-09-14 Jack Howarth <howarth@bromo.med.uc.edu> > > * gcc.dg/attr-ifunc-1.c: Add dg-require-weak and dg-require-alias. > * g++.dg/ext/attr-ifunc-1.C: Likewise. > > Index: gcc/testsuite/gcc.dg/attr-ifunc-1.c > =================================================================== > --- gcc/testsuite/gcc.dg/attr-ifunc-1.c (revision 164270) > +++ gcc/testsuite/gcc.dg/attr-ifunc-1.c (working copy) > @@ -1,5 +1,7 @@ > /* { dg-do run } */ > /* { dg-require-ifunc "" } */ > +/* { dg-require-weak "" } */ > +/* { dg-require-alias "" } */ > /* { dg-options "" } */ > > #include <stdio.h> > Index: gcc/testsuite/g++.dg/ext/attr-ifunc-1.C > =================================================================== > --- gcc/testsuite/g++.dg/ext/attr-ifunc-1.C (revision 164270) > +++ gcc/testsuite/g++.dg/ext/attr-ifunc-1.C (working copy) > @@ -1,5 +1,7 @@ > /* { dg-do run } */ > /* { dg-require-ifunc "" } */ > +/* { dg-require-weak "" } */ > +/* { dg-require-alias "" } */ > /* { dg-options "-Wno-pmf-conversions" } */ > > #include <stdio.h>
On Tue, Sep 14, 2010 at 12:23:22PM +0200, Richard Guenther wrote: > > No - somehow dg-require-ifunc does not work. > The comments above proc check_ifunc_available in testsuite/lib/target-supports.exp claim... # Determine if the target toolchain supports the alias attribute. # Returns 2 if the target supports aliases. Returns 1 if the target # only supports weak aliased. Returns 0 if the target does not # support aliases at all. Returns -1 if support for aliases could not # be determined. yet the actual test only has... if [string match "" $lines] then { # No error messages, everything is OK. set ifunc_available_saved 2 } else { if [regexp "ifunc is not supported" $lines] { verbose "check_ifunc_available target does not support ifunc" 2 set ifunc_available_saved 0 } else { set ifunc_available_saved -1 } } verbose "check_ifunc_available returning $ifunc_available_saved" 2 compared to the actual proc check_alias_available which, with the same comments, contains the expanded test... if [string match "" $lines] then { # No error messages, everything is OK. set alias_available_saved 2 } else { if [regexp "alias definitions not supported" $lines] { verbose "check_alias_available target does not support aliases" 2 set objformat [gcc_target_object_format] if { $objformat == "elf" } { verbose "check_alias_available but target uses ELF format, so it ought to" 2 set alias_available_saved -1 } else { set alias_available_saved 0 } } else { if [regexp "only weak aliases are supported" $lines] { verbose "check_alias_available target supports only weak aliases" 2 set alias_available_saved 1 } else { set alias_available_saved -1 } } } verbose "check_alias_available returning $alias_available_saved" 2 It is unclear why this test was reduced (as well as why the new ifunc tests simply didn't use the pre-existing check_alias_available and dg-require-alias as the new check_ifunc_available and dg-require-ifunc appear to be just copies of those). Jack > Richard. >
Index: gcc/testsuite/gcc.dg/attr-ifunc-1.c =================================================================== --- gcc/testsuite/gcc.dg/attr-ifunc-1.c (revision 164270) +++ gcc/testsuite/gcc.dg/attr-ifunc-1.c (working copy) @@ -1,5 +1,7 @@ /* { dg-do run } */ /* { dg-require-ifunc "" } */ +/* { dg-require-weak "" } */ +/* { dg-require-alias "" } */ /* { dg-options "" } */ #include <stdio.h> Index: gcc/testsuite/g++.dg/ext/attr-ifunc-1.C =================================================================== --- gcc/testsuite/g++.dg/ext/attr-ifunc-1.C (revision 164270) +++ gcc/testsuite/g++.dg/ext/attr-ifunc-1.C (working copy) @@ -1,5 +1,7 @@ /* { dg-do run } */ /* { dg-require-ifunc "" } */ +/* { dg-require-weak "" } */ +/* { dg-require-alias "" } */ /* { dg-options "-Wno-pmf-conversions" } */ #include <stdio.h>