On Thu, Oct 23, 2014 at 3:54 PM, Uros Bizjak <ubiz...@gmail.com> wrote:
>>> Ok, will try that. Still no idea why Linux/x86 and Solaris/x86 are >>> different here. >> >> Why do you think so? I certainly have: >> FAIL: gcc.dg/ipa/ipa-icf-21.c (test for excess errors) >> UNRESOLVED: gcc.dg/ipa/ipa-icf-21.c scan-ipa-dump icf "Equal symbols: 1" >> UNRESOLVED: gcc.dg/ipa/ipa-icf-21.c scan-ipa-dump icf "Semantic equality >> hit:bar->foo" >> in my i686-linux test_summary log. It really depends on how the compiler > > Right, but on i386-pc-solaris2.11 it passes. > >> is configured, if it defaults to march that has sse/sse2 by default, it will >> succeed, otherwise it will not. > > For some reason, I hit a division by zero on alphaev68-linux-gnu in > the report generation code: > > Starting program: /space/uros/gcc-build/prev-gcc/cc1 -O2 > -fdump-ipa-icf -quiet ipa-icf-14.i > > Program received signal SIGFPE, Arithmetic exception. > ipa_icf::sem_item_optimizer::merge_classes (this=0x12187dd80, > prev_class_count=3) at > /space/homedirs/uros/gcc-svn/trunk/gcc/ipa-icf.c:2203 > 2203 non_singular_classes_count); > (gdb) list > 2198 fprintf (dump_file, "Average class size before: %.2f, > after: %.2f\n", > 2199 1.0f * item_count / prev_class_count, > 2200 1.0f * item_count / class_count); > 2201 fprintf (dump_file, "Average non-singular class size: > %.2f, count: %u\n", > 2202 1.0f * non_singular_classes_sum / > non_singular_classes_count, > 2203 non_singular_classes_count); > 2204 fprintf (dump_file, "Equal symbols: %u\n", equal_items); > 2205 fprintf (dump_file, "Fraction of visited symbols: %.2f%%\n\n", > 2206 100.0f * equal_items / item_count); > 2207 } > (gdb) p non_singular_classes_count > $1 = 0 Also: (gdb) p non_singular_classes_sum $1 = 0 This creates a nice NaN which can throw an exception. (gdb) bt #0 ipa_icf::sem_item_optimizer::merge_classes (this=0x12187dd80, prev_class_count=3) at /space/homedirs/uros/gcc-svn/trunk/gcc/ipa-icf.c:2203 #1 0x0000000121255c70 in ipa_icf::sem_item_optimizer::execute (this=0x12187dd80) at /space/homedirs/uros/gcc-svn/trunk/gcc/ipa-icf.c:1602 #2 0x000000012125999c in ipa_icf::ipa_icf_driver () at /space/homedirs/uros/gcc-svn/trunk/gcc/ipa-icf.c:2319 #3 0x000000012125a46c in ipa_icf::pass_ipa_icf::execute (this=0x121850f20) at /space/homedirs/uros/gcc-svn/trunk/gcc/ipa-icf.c:2367 #4 0x00000001209c10c4 in execute_one_pass (pass=0x121850f20) at /space/homedirs/uros/gcc-svn/trunk/gcc/passes.c:2156 #5 0x00000001209c26f4 in execute_ipa_pass_list (pass=0x121850f20) at /space/homedirs/uros/gcc-svn/trunk/gcc/passes.c:2550 #6 0x000000012048fcdc in ipa_passes () at /space/homedirs/uros/gcc-svn/trunk/gcc/cgraphunit.c:2057 Uros.