[Bug c/52795] FAIL: gcc.dg/tree-prof/pr34999.c compilation, -fprofile-use -D_PROFILE_USE on {x86_64,i386}-apple-darwin{10,11} at -m64

2013-10-12 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52795

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-10-12
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Confirmed on darwin12 for 4.7, 4.8 and trunk (r203489) only with -m64. In
addition I see

FAIL: gcc.dg/tree-prof/pr45354.c compilation,  -fprofile-use -D_PROFILE_USE
FAIL: gcc.dg/tree-prof/pr50907.c compilation,  -fprofile-use -D_PROFILE_USE

and

FAIL: g++.dg/tree-prof/pr57451.C compilation,  -fprofile-use


[Bug c/52795] FAIL: gcc.dg/tree-prof/pr34999.c compilation, -fprofile-use -D_PROFILE_USE on {x86_64,i386}-apple-darwin{10,11} at -m64

2012-03-30 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52795

--- Comment #1 from Jack Howarth howarth at nitro dot med.uc.edu 2012-03-30 
19:40:43 UTC ---
Created attachment 27048
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27048
testcase from radar://10960042 generated on x86_64-apple-darwin11 (

The FSF gcc testsuite failure...

FAIL: gcc.dg/tree-prof/pr34999.c compilation,  -fprofile-use -D_PROFILE_USE
UNRESOLVED: gcc.dg/tree-prof/pr34999.c execution,-fprofile-use
-D_PROFILE_USE

seen at -m64 with Xcode 4.3's linker may be showing a linker bug. The attached
testcase contains the files obtained with...

/sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/xgcc
-B/sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/
/sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20120228/gcc/testsuite/gcc.dg/tree-prof/pr34999.c
   -O2 -freorder-blocks-and-partition -fprofile-generate -D_PROFILE_GENERATE 
-lm   -m64 -o pr34999.x01

Executing the resulting pr34999.x01 to produce the profiling code in
pr34999.gcda (provided) and...

/sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/xgcc
-B/sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/gcc/
/sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20120228/gcc/testsuite/gcc.dg/tree-prof/pr34999.c
-O2 -freorder-blocks-and-partition -fprofile-use -D_PROFILE_USE -lm -m64
--save-temps -v -o pr34999.x02

which produces the linker error...

Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse,
file /SourceCache/ld64/ld64-128.2/src/ld/parsers/macho_relocatable_file.cpp,
line 1519.
0  0x10c62d1df  __assert_rtn + 79
1  0x10c648ae5 
mach_o::relocatable::Parserx86_64::parse(mach_o::relocatable::ParserOptions
const) + 917
2  0x10c63632e  mach_o::relocatable::Parserx86_64::parse(unsigned char
const*, unsigned long long, char const*, long, unsigned int,
mach_o::relocatable::ParserOptions const) + 286
3  0x10c632b2b  mach_o::relocatable::parse(unsigned char const*, unsigned long
long, char const*, long, unsigned int, mach_o::relocatable::ParserOptions
const) + 91
4  0x10c66b6fd  ld::tool::InputFiles::makeFile(Options::FileInfo const, bool)
+ 653
5  0x10c66ccfb  ld::tool::InputFiles::InputFiles(Options, char const**) + 651
6  0x10c62d426  main + 358

which can be reproduced with the provided bad_link shell script which
executes...

ld -dynamic -arch x86_64 -macosx_version_min 10.7.3 -weak_reference_mismatches
non-weak -o pr34999.x02 -lcrt1.10.6.o -L. pr34999.o -no_compact_unwind -lSystem
-lgcc_ext.10.5 -lgcc -lSystem -v