public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111816] New: GCC: 14: internal compiler error: Segmentation fault at c_parser_parse_gimple_body
@ 2023-10-15  1:21 141242068 at smail dot nju.edu.cn
  2023-10-15  1:26 ` [Bug c/111816] ICE with _GIMPLE and 2 returns pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-10-15  1:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111816
           Summary: GCC: 14: internal compiler error: Segmentation fault
                    at c_parser_parse_gimple_body
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

When compile this program with GCC-14, GCC crashes:
```
__GIMPLE (ssa) int foo (int *a)
{
  return 0;
  return 0;
}
```

Compiler Explorer: https://godbolt.org/z/zecdo68WE

The full stack dump:
```
<source>: In function 'foo':
<source>:5:1: internal compiler error: Segmentation fault
    5 | }
      | ^
0x22ff3ee internal_error(char const*, ...)
        ???:0
0xaad8ac c_parser_parse_gimple_body(c_parser*, char*, c_declspec_il,
profile_count)
        ???:0
0xaa468d c_parse_file()
        ???:0
0xb17919 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

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

* [Bug c/111816] ICE with _GIMPLE and 2 returns
  2023-10-15  1:21 [Bug c/111816] New: GCC: 14: internal compiler error: Segmentation fault at c_parser_parse_gimple_body 141242068 at smail dot nju.edu.cn
@ 2023-10-15  1:26 ` pinskia at gcc dot gnu.org
  2023-10-16  6:53 ` [Bug c/111816] [gimple FE] ICE with _GIMPLE(ssa) " rguenth at gcc dot gnu.org
  2023-11-04 19:20 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-15  1:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
            Summary|GCC: 14: internal compiler  |ICE with _GIMPLE and 2
                   |error: Segmentation fault   |returns
                   |at                          |
                   |c_parser_parse_gimple_body  |

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note even though the gimple FE exists, it is mainly designed ONLY for testsuite
usage and that there will be many corner cases like this where code will cause
an ICE rather than be rejected for being invalid.

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

* [Bug c/111816] [gimple FE] ICE with _GIMPLE(ssa) and 2 returns
  2023-10-15  1:21 [Bug c/111816] New: GCC: 14: internal compiler error: Segmentation fault at c_parser_parse_gimple_body 141242068 at smail dot nju.edu.cn
  2023-10-15  1:26 ` [Bug c/111816] ICE with _GIMPLE and 2 returns pinskia at gcc dot gnu.org
@ 2023-10-16  6:53 ` rguenth at gcc dot gnu.org
  2023-11-04 19:20 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-16  6:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |101057

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Speicfically we're not interested in "fuzzing" it, but only cases you run into
when you are trying to exercise it for its purpose.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101057
[Bug 101057] [gimplefe] GIMPLE frontend issues

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

* [Bug c/111816] [gimple FE] ICE with _GIMPLE(ssa) and 2 returns
  2023-10-15  1:21 [Bug c/111816] New: GCC: 14: internal compiler error: Segmentation fault at c_parser_parse_gimple_body 141242068 at smail dot nju.edu.cn
  2023-10-15  1:26 ` [Bug c/111816] ICE with _GIMPLE and 2 returns pinskia at gcc dot gnu.org
  2023-10-16  6:53 ` [Bug c/111816] [gimple FE] ICE with _GIMPLE(ssa) " rguenth at gcc dot gnu.org
@ 2023-11-04 19:20 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-04 19:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-11-04
     Ever confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

      /* We have a CFG.  Build the edges.  */
      for (unsigned i = 0; i < parser.edges.length (); ++i)
        {
          edge e = make_edge (BASIC_BLOCK_FOR_FN (cfun, parser.edges[i].src),
                              BASIC_BLOCK_FOR_FN (cfun, parser.edges[i].dest),
                              parser.edges[i].flags);
          e->probability = parser.edges[i].probability;
        }



make_edge is returning NULL.

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

end of thread, other threads:[~2023-11-04 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-15  1:21 [Bug c/111816] New: GCC: 14: internal compiler error: Segmentation fault at c_parser_parse_gimple_body 141242068 at smail dot nju.edu.cn
2023-10-15  1:26 ` [Bug c/111816] ICE with _GIMPLE and 2 returns pinskia at gcc dot gnu.org
2023-10-16  6:53 ` [Bug c/111816] [gimple FE] ICE with _GIMPLE(ssa) " rguenth at gcc dot gnu.org
2023-11-04 19:20 ` 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).