Command line: $ gcc -O3 -fcompare-debug -march=amdfam10 ada-langn.i or $ gcc -O2 -fcompare-debug -finline-functions -fipa-cp-clone -fkeep-inline-functions ada-langn.i (I am not able to reproduce it with these flags anymore) or $ gcc -O1 -fgcse -finline-small-functions -foptimize-sibling-calls -ftree-pre -ftree-switch-conversion -ftree-vrp -fpartial-inlining -finline-functions -fkeep-inline-functions -fcompare-debug ada-langn.i The difference in dumps is small: $ diff *gkd 107804c107804 < (const_int 32 [0x20])) [ MEM[(struct type *)0B].main_type+0 S8 A64])) ada-langn.i:15638# {*movdi_internal_rex64} --- > (const_int 32 [0x20])) [ 0B->main_type+0 S8 A64])) ada-langn.i:15638# {*movdi_internal_rex64} "MEM[(struct type *)0B]." <=> "0B->" Tested revision: r164287 - fail r164280 - fail r164228 - fail
Created attachment 21797 [details] testcase, preprocessed ada-lang.c from GDB (licensed under GPLv2) Reducing is very slow, after 4 hours of delta run I got to ~16000 lines. So I am uploading the original testcase.
Another dumping artifact probably. At some point I'd like to dump all MEM_REFs as MEM[(...)p + cst] and drop the fancy ways.
Mine
Created attachment 21854 [details] Patch that fixes the problem Here's the patch I'm testing. Turns out it's not enough to take only the second pointer type into account, the first also matters because we'll get different dump output depending on whether they're equal or not. In this case, we failed to distinguish (void*)0B and (struct type*)0B in the first operands. Richi, care to pre-approve it in case it passes regstrap?
Author: aoliva Date: Fri Oct 8 04:40:59 2010 New Revision: 165149 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165149 Log: PR debug/45673 PR debug/45604 PR debug/45419 PR debug/45408 * tree-pretty-print.c (dump_generic_node): Explicitly dump the type of MEM_REFs to INTEGER_CSTs. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-pretty-print.c
Fixed