While constructing a patch to resolve PR41313 on darwin, I noticed an oddity.
The problem in PR41313 is due to hot/cold partitioning not being understood by
darwin_emit_unwind_label() such that duplicate .eh symbols can be created. This 
can be fixed by restoring the previous behavior for disabling 
-freorder-blocks-and-partition
when using exception handling, if the target requested unwind info or if target 
does not support
named sections...

http://gcc.gnu.org/bugzilla/attachment.cgi?id=18718&action=view

however we still end up with two failing test cases...

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

which are still due to duplicate symbols...

Executing on host: 
/sw/src/fink.build/gcc45-4.4.999-20091006/darwin_objdir/gcc/xgcc 
-B/sw/src/fink.build/gcc45-4.4.999-20091006/darwin_objdir/gcc/ 
/sw/src/fink.build/gcc45-4.4.999-
20091006/gcc-4.5-20091006/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c   -O2 
-freorder-blocks-and-partition -fprofile-use -D_PROFILE_USE  -lm   -o 
/sw/src/fink.build/gcc45-4.4.999-200
91006/darwin_objdir/gcc/testsuite/gcc/bb-reorg.x02    (timeout = 300)
/var/tmp//ccYRIMnq.s:230:FATAL:Symbol _foo.eh already defined.
compiler exited with status 1
output is:
/var/tmp//ccYRIMnq.s:230:FATAL:Symbol _foo.eh already defined.

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

Executing on host: 
/sw/src/fink.build/gcc45-4.4.999-20091006/darwin_objdir/gcc/xgcc 
-B/sw/src/fink.build/gcc45-4.4.999-20091006/darwin_objdir/gcc/ 
/sw/src/fink.build/gcc45-4.4.999-
20091006/gcc-4.5-20091006/gcc/testsuite/gcc.dg/tree-prof/pr34999.c   -O2 
-freorder-blocks-and-partition -fprofile-use -D_PROFILE_USE  -lm   -o 
/sw/src/fink.build/gcc45-4.4.999-2009
1006/darwin_objdir/gcc/testsuite/gcc/pr34999.x02    (timeout = 300)
/var/tmp//ccL8gCZB.s:219:FATAL:Symbol _main.eh already defined.
compiler exited with status 1
output is:
/var/tmp//ccL8gCZB.s:219:FATAL:Symbol _main.eh already defined.

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

It seems unclear why those two test cases should be emitting unwind labels.
I can understand cases like g++.dg/tree-prof/partition1.C as it has try and
catch statements, but I don't see anything in gcc.dg/tree-prof/bb-reorg.c
or gcc.dg/tree-prof/pr34999.c that should be triggering a call to
the subroutine set in TARGET_ASM_EMIT_UNWIND_LABEL. Or is a break or
abort() sufficient to trigger the emitting of an unwind label?
                  Jack

Reply via email to