http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46916

--- Comment #95 from Dominique d'Humieres <dominiq at lps dot ens.fr> 
2010-12-17 22:07:55 UTC ---
For the reasons given below, I have reached the conclusion that the failures
for g++.dg/tree-prof/partition2.C are not caused by the above patches, but
exposed by any patch fixing this pr.

Looking at gcc/testsuite/lib/target-supports.exp, I see

proc check_effective_target_freorder {} {
    return [check_no_compiler_messages freorder object {
        void foo (void) { }
    } "-freorder-blocks-and-partition"]
}

Then I did the following tests:

[macbook] f90/bug% cat > order.c
void foo (void) { }
[macbook] f90/bug% /opt/gcc/gcc4.6p/bin/gcc -c -freorder-blocks-and-partition
order.c
gcc: internal compiler error: Segmentation fault (program cc1)

The backtrace

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5bc00ffc
htab_find_slot_with_hash (htab=0x142420d90, element=0x7fff5bc01050, hash=2086,
insert=INSERT) at ../../p_work/libiberty/hashtab.c:644
644    {
(gdb) bt
#0  htab_find_slot_with_hash (htab=0x142420d90, element=0x7fff5bc01050,
hash=2086, insert=INSERT) at ../../p_work/libiberty/hashtab.c:644
#1  0x00000001007eb558 in cgraph_node (decl=0x142591200) at
../../p_work/gcc/cgraph.c:502

is exactly the one reported in comment #0. So if the segmentation fault is
fixed, it is also fixed for the freorder test and the tests that were
UNSUPPORTED are then executed.

So the partition2.C failures are due to another bug of the generation of
debugging information on darwin. If nobody is faster, I'll open a new pr for it
when this pr will have been fixed. For the record note that the failure for -O3
-g is slightly different from the one reported in comment #12:

ld: warning: can't add line info to anonymous symbol anon-func-0x0 from
/var/folders/LW/LW1oufkMGIqlLpjYn45fBU+++TI/-Tmp-//cc5PMZA6.o
ld: warning: can't add line info to anonymous symbol anon-func-0x0 from
/var/folders/LW/LW1oufkMGIqlLpjYn45fBU+++TI/-Tmp-//cc5PMZA6.o
warning: no debug symbols in executable (-arch i386)

Reply via email to