public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/94731] New: [10 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2558
@ 2020-04-23 13:58 anbu1024.me at gmail dot com
  2020-04-23 14:17 ` [Bug c/94731] [8/9/10 " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: anbu1024.me at gmail dot com @ 2020-04-23 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94731
           Summary: [10 Regression] internal compiler error: in
                    fold_convert_loc, at fold-const.c:2558
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anbu1024.me at gmail dot com
  Target Milestone: ---

$ cat reduced.c 

int x = - 1 << 0 ; 

int foo () 
{ 
    switch ( x ) 
        case - 1 << 0 : 
            break ; 
}

int x[] = { 1 };

--------------------------------------------------------------------------------

$ gcc-10 --version
gcc (GCC) 10.0.1 20200419 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--------------------------------------------------------------------------------

$ gcc-10 reduced.c 
reduced.c:11:5: error: conflicting types for ‘x’
   11 | int x[] = { 1 };
      |     ^
reduced.c:2:5: note: previous definition of ‘x’ was here
    2 | int x = - 1 << 0 ;
      |     ^
during GIMPLE pass: cfg
reduced.c: In function ‘foo’:
reduced.c:4:5: internal compiler error: in fold_convert_loc, at
fold-const.c:2558
    4 | int foo ()
      |     ^~~
0x65b384 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc-10-20200419/gcc/fold-const.c:2558
0xdf7852 convert_single_case_switch
        ../../gcc-10-20200419/gcc/tree-cfgcleanup.c:110
0xdf7852 cleanup_control_expr_graph
        ../../gcc-10-20200419/gcc/tree-cfgcleanup.c:145
0xdf7852 cleanup_control_flow_bb
        ../../gcc-10-20200419/gcc/tree-cfgcleanup.c:252
0xdf7a95 cleanup_control_flow_pre
        ../../gcc-10-20200419/gcc/tree-cfgcleanup.c:886
0xdf8c4b cleanup_tree_cfg_noloop
        ../../gcc-10-20200419/gcc/tree-cfgcleanup.c:1055
0xdf9428 cleanup_tree_cfg(unsigned int)
        ../../gcc-10-20200419/gcc/tree-cfgcleanup.c:1165
0xdf03a4 execute_build_cfg
        ../../gcc-10-20200419/gcc/tree-cfg.c:376
0xdf03a4 execute
        ../../gcc-10-20200419/gcc/tree-cfg.c:405
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

--------------------------------------------------------------------------------

$ gcc-9 --version
gcc (GCC) 9.2.1 20191102
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--------------------------------------------------------------------------------

$ gcc-9 reduced.c 
reduced.c:11:5: error: conflicting types for ‘x’
   11 | int x[] = { 1 };
      |     ^
reduced.c:2:5: note: previous definition of ‘x’ was here
    2 | int x = - 1 << 0 ;
      |     ^
reduced.c:4: confused by earlier errors, bailing out

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-12  6:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 13:58 [Bug c/94731] New: [10 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2558 anbu1024.me at gmail dot com
2020-04-23 14:17 ` [Bug c/94731] [8/9/10 " jakub at gcc dot gnu.org
2021-05-14  9:53 ` [Bug c/94731] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:17 ` rguenth at gcc dot gnu.org
2021-06-12  6:36 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).