https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67512

            Bug ID: 67512
           Summary: [5/6 Regression] internal compiler error: in
                    invert_tree_comparison, at fold-const.c:2456
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

The following ICEs on x86_64-pc-linux-gnu:

$ ./cc1 -quiet ice.c -O -Wmaybe-uninitialized
ice.c: In function ‘fn1’:
ice.c:9:22: warning: ‘m’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   z = 1 == m ? z : 2 == m;
                      ^
ice.c:4:1: internal compiler error: in invert_tree_comparison, at
fold-const.c:2456
 fn1 (void)
 ^
0xa0288f invert_tree_comparison(tree_code, bool)
        /home/marek/src/gcc/gcc/fold-const.c:2456
0xfb8bb4 pred_equal_p
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:1300
0xfb8cc5 is_pred_expr_subset_of
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:1349
0xfb8eb2 is_pred_chain_subset_of
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:1399
0xfb8f44 is_included_in
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:1428
0xfb8fcd is_superset_of
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:1459
0xfbaaed is_use_properly_guarded
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:2239
0xfbac41 find_uninit_use
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:2283
0xfbae9e warn_uninitialized_phi
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:2353
0xfbb3a7 execute
        /home/marek/src/gcc/gcc/tree-ssa-uninit.c:2463
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.


extern int fn2 (void);
extern int fn3 (int);
void
fn1 (void)
{
  int z, m;
  if (1 & m)
    z = fn2 ();
  z = 1 == m ? z : 2 == m;
  fn3 (z);
}

Reply via email to