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

* [Bug c/94731] [8/9/10 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2558
  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 ` jakub at gcc dot gnu.org
  2021-05-14  9:53 ` [Bug c/94731] [9/10/11/12 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-23 14:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-04-23
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org
            Summary|[10 Regression] internal    |[8/9/10 Regression]
                   |compiler error: in          |internal compiler error: in
                   |fold_convert_loc, at        |fold_convert_loc, at
                   |fold-const.c:2558           |fold-const.c:2558
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |8.5
           Keywords|                            |error-recovery
           Priority|P3                          |P4

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This one started to ICE with r8-2897-g02e637d86f9ecb6d0e368438291bb6f6f8feb3ab
I bet in the end it is the same FE bug, that it really shouldn't change the
type of a decl on duplicate_decls once it has been used because the middle-end
is unprepared to see error_mark_nodes.

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

* [Bug c/94731] [9/10/11/12 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2558
  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 ` 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
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

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

* [Bug c/94731] [9/10/11/12 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2558
  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
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug c/94731] [9/10/11/12 Regression] internal compiler error: in fold_convert_loc, at fold-const.c:2558
  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
                   ` (2 preceding siblings ...)
  2021-06-01  8:17 ` rguenth at gcc dot gnu.org
@ 2021-06-12  6:36 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-12  6:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Almost an exact dup of bug 79412.

*** This bug has been marked as a duplicate of bug 79412 ***

^ 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).