Created attachment 29910 [details] C source code I just tried to compile the package GREYCstoration-2.8-15.fc20 on gcc-4.9 trunk dated 20130421 on an AMD x86_64 box. The compiler said Unable to coalesce ssa_names 97 and 101 which are marked as MUST COALESCE. image_depth_97(ab) and image_depth_101(ab) coders/png.c: In function 'WriteOnePNGImage': coders/png.c:6287:23: internal compiler error: SSA corruption static MagickPassFail WriteOnePNGImage(MngInfo *mng_info, ^ 0x9b1baf fail_abnormal_edge_coalesce ../../src/trunk/gcc/tree-ssa-coalesce.c:934 0x9b1baf coalesce_partitions ../../src/trunk/gcc/tree-ssa-coalesce.c:1236 0x9b1baf coalesce_ssa_name() ../../src/trunk/gcc/tree-ssa-coalesce.c:1373 0x969ba3 remove_ssa_form ../../src/trunk/gcc/tree-outof-ssa.c:900 0x969ba3 rewrite_out_of_ssa(ssaexpand*) ../../src/trunk/gcc/tree-outof-ssa.c:1133 0x5f5f44 gimple_expand_cfg ../../src/trunk/gcc/cfgexpand.c:4480 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Preprocessed source code attached. Flag -O2 required.
Reduced testcase: typedef struct __jmp_buf_tag { char buf[1024]; } jmp_buf[1]; extern int setjmp (jmp_buf); extern int bar (unsigned int *); extern jmp_buf *baz (void); struct C { int c1; unsigned int c2, c3, c4; }; void foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g) { unsigned int d; unsigned long f; setjmp (*baz ()); f = d; if ((x->c1 || x->c2) && g && (!e || d >= 8)) d = 16; else d = 8; if ((!x->c3 && !x->c4 || *y == 0) && !e && bar (z)) *z = f; } Guess caused by http://gcc.gnu.org/r198096
I will have a look.
VRP does setjmp (_3(ab)); - f_12 = (long unsigned int) d_1(ab); ... - <bb 15>: - _26 = (unsigned int) f_12; + <bb 16>: + _26 = d_1(ab); *z_23(D) = _26; that's obviously not ok.
Author: rguenth Date: Tue Apr 23 08:08:25 2013 New Revision: 198175 URL: http://gcc.gnu.org/viewcvs?rev=198175&root=gcc&view=rev Log: 2013-04-23 Richard Biener <rguenther@suse.de> PR tree-optimization/57026 * tree-vrp.c (simplify_conversion_using_ranges): Do not propagate from SSA names occuring in abnormal PHI nodes. * gcc.dg/torture/pr57026.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr57026.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vrp.c