public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99990] New: Crash in GCC-11/gimplify
@ 2021-04-09 11:33 k.even-mendoza at imperial dot ac.uk
  2021-04-09 11:46 ` [Bug c/99990] " marxin at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: k.even-mendoza at imperial dot ac.uk @ 2021-04-09 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99990
           Summary: Crash in GCC-11/gimplify
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: k.even-mendoza at imperial dot ac.uk
  Target Milestone: ---

In Ubuntu 18, with GCC-11 (gcc (GCC) 11.0.1 20210317 (experimental)), when
trying to compile this code:

#include <stdarg.h>
void a() {
  va_arg(0, long);
  void *b[] = 0;
}

GCC-11 crashed with this error:
===
/home/user42/data/gcc-csmith-0/gcc-install/bin/gcc 
934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c
In file included from 934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c:1:
934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c: In function ‘a’:
934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c:3:13: error: first argument to
‘va_arg’ not of type ‘va_list’
    3 |   va_arg(0, long);
      |             ^~~~
934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c:4:15: error: invalid initializer
    4 |   void *b[] = 0;
      |               ^
In file included from 934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c:1:
934d08d3ee1bab940b2f2f2651e06ccaf8d82f87.c:3:13: internal compiler error: in
gimplify_va_arg_expr, at gimplify.c:15594
    3 |   va_arg(0, long);
      |             ^
0x6b7b93 gimplify_va_arg_expr(tree_node**, gimple**, gimple**)
        .././../gcc-source/gcc/gimplify.c:15594
0xb8e839 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        .././../gcc-source/gcc/gimplify.c:14156
0xb91416 gimplify_stmt(tree_node**, gimple**)
        .././../gcc-source/gcc/gimplify.c:6876
0xb8ecbb gimplify_statement_list
        .././../gcc-source/gcc/gimplify.c:1879
0xb8ecbb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        .././../gcc-source/gcc/gimplify.c:14526
0xb91416 gimplify_stmt(tree_node**, gimple**)
        .././../gcc-source/gcc/gimplify.c:6876
0xb91bd1 gimplify_bind_expr
        .././../gcc-source/gcc/gimplify.c:1421
0xb8e1ee gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        .././../gcc-source/gcc/gimplify.c:14283
0xba776f gimplify_stmt(tree_node**, gimple**)
        .././../gcc-source/gcc/gimplify.c:6876
0xba776f gimplify_body(tree_node*, bool)
        .././../gcc-source/gcc/gimplify.c:15318
0xba7b9d gimplify_function_tree(tree_node*)
        .././../gcc-source/gcc/gimplify.c:15472
0x9dc057 cgraph_node::analyze()
        .././../gcc-source/gcc/cgraphunit.c:670
0x9debb7 analyze_functions
        .././../gcc-source/gcc/cgraphunit.c:1236
0x9df81d symbol_table::finalize_compilation_unit()
        .././../gcc-source/gcc/cgraphunit.c:2514
Please submit a full bug report,
===
Before (gcc-10) it would just stop the compilation (with these two errors) and
exit without crashing.

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

end of thread, other threads:[~2022-01-03 20:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 11:33 [Bug c/99990] New: Crash in GCC-11/gimplify k.even-mendoza at imperial dot ac.uk
2021-04-09 11:46 ` [Bug c/99990] " marxin at gcc dot gnu.org
2021-04-09 12:08 ` k.even-mendoza at imperial dot ac.uk
2021-04-09 12:18 ` jakub at gcc dot gnu.org
2021-04-09 12:32 ` [Bug c/99990] [8/9/10/11 Regression] ICE in gimplifier on invalid va_arg jakub at gcc dot gnu.org
2021-04-09 12:51 ` jakub at gcc dot gnu.org
2021-04-10 15:02 ` cvs-commit at gcc dot gnu.org
2021-04-10 15:03 ` [Bug c/99990] [8/9/10 " jakub at gcc dot gnu.org
2021-04-20  9:46 ` cvs-commit at gcc dot gnu.org
2021-04-20  9:51 ` [Bug c/99990] [8/9 " jakub at gcc dot gnu.org
2021-04-20 23:34 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:52 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:11 ` jakub at gcc dot gnu.org
2022-01-03 20:54 ` 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).