public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325
@ 2021-07-26 18:42 cnsun at uwaterloo dot ca
  2021-08-22  4:44 ` [Bug c/101630] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-07-26 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101630
           Summary: ICE with -Wall: in get_constant, at
                    c-family/c-format.c:325
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210726 (experimental) [master revision
:c09cf6429:124bb55777c280a85d0c72ec13e293a32917a6b9] (GCC)

$ cat mutant.c
printf(char[][], ...) { printf(printf); }

$ gcc-trunk -Wall mutant.c
mutant.c:1:12: error: array type has incomplete element type ‘char[]’
    1 | printf(char[][], ...) { printf(printf); }
      |            ^
mutant.c:1:12: note: declaration of multidimensional array must have bounds for
all dimensions except the first
mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | printf(char[][], ...) { printf(printf); }
      | ^~~~~~
mutant.c: In function ‘printf’:
mutant.c:1:32: error: type of formal parameter 1 is incomplete
    1 | printf(char[][], ...) { printf(printf); }
      |                                ^~~~~~
mutant.c:1:1: internal compiler error: in get_constant, at
c-family/c-format.c:325
    1 | printf(char[][], ...) { printf(printf); }
      | ^~~~~~
0x675c97 get_constant
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c-family/c-format.c:325
0x675c97 get_constant
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c-family/c-format.c:313
0x9b061e decode_format_attr
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c-family/c-format.c:377
0x9b2894 check_function_format(tree_node const*, tree_node*, int, tree_node**,
vec<unsigned int, va_heap, vl_ptr>*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c-family/c-format.c:1173
0x9a1c86 check_function_arguments(unsigned int, tree_node const*, tree_node
const*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c-family/c-common.c:5981
0x92a0eb build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*, tree_node*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-typeck.c:3195
0x94b27a c_parser_postfix_expression_after_primary
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:10505
0x93bc65 c_parser_postfix_expression
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:10178
0x946141 c_parser_unary_expression
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:8224
0x94780f c_parser_cast_expression
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:8066
0x947abf c_parser_binary_expression
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:7869
0x948da8 c_parser_conditional_expression
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:7592
0x949420 c_parser_expr_no_commas
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:7507
0x9496b1 c_parser_expression
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:10641
0x949e87 c_parser_expression_conv
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:10680
0x95d2f3 c_parser_statement_after_labels
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:6249
0x95f594 c_parser_compound_statement_nostart
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:5788
0x95fc84 c_parser_compound_statement
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:5597
0x961672 c_parser_declaration_or_fndef
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:2539
0x968ff3 c_parser_external_declaration
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/c/c-parser.c:1777
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.





Note that with -Wall, gcc-trunk also crashes though with a different stack
trace.

mutant.c:1:12: error: array type has incomplete element type ‘char[]’
    1 | printf(char[][], ...) { printf(printf); }
      |            ^
mutant.c:1:12: note: declaration of multidimensional array must have bounds for
all dimensions except the first
mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | printf(char[][], ...) { printf(printf); }
      | ^~~~~~
mutant.c: In function ‘printf’:
mutant.c:1:32: error: type of formal parameter 1 is incomplete
    1 | printf(char[][], ...) { printf(printf); }
      |                                ^~~~~~
mutant.c:1:25: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:259
    1 | printf(char[][], ...) { printf(printf); }
      |                         ^~~~~~
0x7d0759 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/tree.c:8736
0x6dd971 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/tree.h:3496
0x6dd971 useless_type_conversion_p(tree_node*, tree_node*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimple-expr.c:259
0xc583d7 types_compatible_p
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimple-expr.h:67
0xc583d7 gimplify_addr_expr
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:6235
0xc4adbf gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:14270
0xc53ba9 gimplify_call_expr
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:3454
0xc4b45f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:14195
0xc4dc6a gimplify_stmt(tree_node**, gimple**)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:6869
0xc4e49e gimplify_bind_expr
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:1426
0xc4b47c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:14424
0xc4dc6a gimplify_stmt(tree_node**, gimple**)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:6869
0xc4f293 gimplify_body(tree_node*, bool)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:15456
0xc4f6e1 gimplify_function_tree(tree_node*)
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/gimplify.c:15610
0xaa2777 cgraph_node::analyze()
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/cgraphunit.c:670
0xaa5651 analyze_functions
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/cgraphunit.c:1234
0xaa6131 symbol_table::finalize_compilation_unit()
        /tmp/tmp.Tt2AkDfoq0-gcc-builder/gcc/gcc/cgraphunit.c:2508
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.

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

* [Bug c/101630] [9/10/11/12 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
@ 2021-08-22  4:44 ` pinskia at gcc dot gnu.org
  2022-01-09  3:15 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22  4:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-08-22
            Summary|ICE with -Wall: in          |[9/10/11/12 Regression] ICE
                   |get_constant, at            |with -Wall: in
                   |c-family/c-format.c:325     |get_constant, at
                   |                            |c-family/c-format.c:325
   Target Milestone|---                         |9.0
     Ever confirmed|0                           |1

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

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

* [Bug c/101630] [9/10/11/12 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
  2021-08-22  4:44 ` [Bug c/101630] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-09  3:15 ` pinskia at gcc dot gnu.org
  2022-01-20 12:42 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-09  3:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c/101630] [9/10/11/12 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
  2021-08-22  4:44 ` [Bug c/101630] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
  2022-01-09  3:15 ` pinskia at gcc dot gnu.org
@ 2022-01-20 12:42 ` rguenth at gcc dot gnu.org
  2022-05-27  9:45 ` [Bug c/101630] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-20 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

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

* [Bug c/101630] [10/11/12/13 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
                   ` (2 preceding siblings ...)
  2022-01-20 12:42 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:45 ` rguenth at gcc dot gnu.org
  2022-06-28 10:45 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug c/101630] [10/11/12/13 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
                   ` (3 preceding siblings ...)
  2022-05-27  9:45 ` [Bug c/101630] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:45 ` jakub at gcc dot gnu.org
  2023-07-07 10:40 ` [Bug c/101630] [11/12/13/14 " rguenth at gcc dot gnu.org
  2024-03-08  3:56 ` [Bug c/101630] [11/12/13 " pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug c/101630] [11/12/13/14 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
                   ` (4 preceding siblings ...)
  2022-06-28 10:45 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:40 ` rguenth at gcc dot gnu.org
  2024-03-08  3:56 ` [Bug c/101630] [11/12/13 " pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

* [Bug c/101630] [11/12/13 Regression] ICE with -Wall: in get_constant, at c-family/c-format.c:325
  2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
                   ` (5 preceding siblings ...)
  2023-07-07 10:40 ` [Bug c/101630] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-03-08  3:56 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-08  3:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12/13/14 Regression]    |[11/12/13 Regression] ICE
                   |ICE with -Wall: in          |with -Wall: in
                   |get_constant, at            |get_constant, at
                   |c-family/c-format.c:325     |c-family/c-format.c:325
      Known to work|                            |14.0
           Keywords|                            |needs-bisection

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks to be fixed on the trunk ...

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

end of thread, other threads:[~2024-03-08  3:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 18:42 [Bug c/101630] New: ICE with -Wall: in get_constant, at c-family/c-format.c:325 cnsun at uwaterloo dot ca
2021-08-22  4:44 ` [Bug c/101630] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-09  3:15 ` pinskia at gcc dot gnu.org
2022-01-20 12:42 ` rguenth at gcc dot gnu.org
2022-05-27  9:45 ` [Bug c/101630] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-07-07 10:40 ` [Bug c/101630] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-08  3:56 ` [Bug c/101630] [11/12/13 " 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).