public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100783] New: ICE: at c/c-objc-common.c:188
@ 2021-05-27  1:15 cnsun at uwaterloo dot ca
  2021-05-27  3:22 ` [Bug c/100783] [11/12 Regression] ICE while printing out error message with nonnull attribute and undeclared decl in an array size in parameter pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-27  1:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100783
           Summary: ICE: at c/c-objc-common.c:188
           Product: gcc
           Version: tree-ssa
            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.tVhv2eaPzV-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 20210526 (experimental) [master revision
:21638bbbf:1fd76b24306ed4df4cf9e797d900699ed59ce7f7] (GCC)

$ cat mutant.c
__attribute__((nonnull(1))) foo(char[z]) {}

$ gcc-trunk  mutant.c
mutant.c:1:38: error: ‘z’ undeclared here (not in a function)
    1 | __attribute__((nonnull(1))) foo(char[z]) {}
      |                                      ^
‘
in print_type, at c/c-objc-common.c:188
    1 | __attribute__((nonnull(1))) foo(char[z]) {}
      | ^~~~~~~~~~~~~
0x654caa print_type
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-objc-common.c:188
0x91de6a c_tree_printer
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-objc-common.c:310
0x91de6a c_tree_printer
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-objc-common.c:254
0x1b358ec pp_format(pretty_printer*, text_info*)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/pretty-print.c:1475
0x1b19f6c diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/diagnostic.c:1244
0x1b1a4ae diagnostic_impl
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/diagnostic.c:1406
0x1b1a9d9 warning(int, char const*, ...)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/diagnostic.c:1527
0x9d04d4 positional_argument(tree_node const*, tree_node const*, tree_node*,
tree_code, int, int)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c-family/c-attribs.c:747
0x9d07c2 handle_nonnull_attribute
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c-family/c-attribs.c:4358
0x8ce496 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/attribs.c:723
0x8eb137 start_function(c_declspecs*, c_declarator*, tree_node*)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-decl.c:9436
0x947cae c_parser_declaration_or_fndef
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:2440
0x94ff73 c_parser_external_declaration
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:1777
0x9509d9 c_parser_translation_unit
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:1650
0x9509d9 c_parse_file()
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c/c-parser.c:21994
0x9b1155 c_common_parse_file()
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/c-family/c-opts.c:1219
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/100783] [11/12 Regression] ICE while printing out error message with nonnull attribute and undeclared decl in an array size in parameter
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
@ 2021-05-27  3:22 ` pinskia at gcc dot gnu.org
  2021-05-27 14:50 ` [Bug c/100783] [10/11/12 " msebor at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-27  3:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
            Summary|ICE: at                     |[11/12 Regression] ICE
                   |c/c-objc-common.c:188       |while printing out error
                   |                            |message with nonnull
                   |                            |attribute and undeclared
                   |                            |decl in an array size in
                   |                            |parameter
            Version|tree-ssa                    |12.0
   Last reconfirmed|                            |2021-05-27
           Keywords|                            |diagnostic,
                   |                            |ice-on-invalid-code
   Target Milestone|---                         |11.2
      Known to work|                            |7.5.0
             Status|UNCONFIRMED                 |NEW

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

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

* [Bug c/100783] [10/11/12 Regression] ICE while printing out error message with nonnull attribute and undeclared decl in an array size in parameter
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
  2021-05-27  3:22 ` [Bug c/100783] [11/12 Regression] ICE while printing out error message with nonnull attribute and undeclared decl in an array size in parameter pinskia at gcc dot gnu.org
@ 2021-05-27 14:50 ` msebor at gcc dot gnu.org
  2021-05-27 16:00 ` [Bug c/100783] [10/11/12 Regression] ICE on attribute nonnull and erroneous type msebor at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-05-27 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12 Regression] ICE      |[10/11/12 Regression] ICE
                   |while printing out error    |while printing out error
                   |message with nonnull        |message with nonnull
                   |attribute and undeclared    |attribute and undeclared
                   |decl in an array size in    |decl in an array size in
                   |parameter                   |parameter
                 CC|                            |msebor at gcc dot gnu.org
      Known to fail|                            |10.3.0, 11.1.0, 12.0, 9.3.0

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Bisection points to r266195 (GCC 9.0).

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

* [Bug c/100783] [10/11/12 Regression] ICE on attribute nonnull and erroneous type
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
  2021-05-27  3:22 ` [Bug c/100783] [11/12 Regression] ICE while printing out error message with nonnull attribute and undeclared decl in an array size in parameter pinskia at gcc dot gnu.org
  2021-05-27 14:50 ` [Bug c/100783] [10/11/12 " msebor at gcc dot gnu.org
@ 2021-05-27 16:00 ` msebor at gcc dot gnu.org
  2021-06-04 17:23 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-05-27 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11/12 Regression] ICE   |[10/11/12 Regression] ICE
                   |while printing out error    |on attribute nonnull and
                   |message with nonnull        |erroneous type
                   |attribute and undeclared    |
                   |decl in an array size in    |
                   |parameter                   |
           Keywords|                            |patch
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571393.html

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

* [Bug c/100783] [10/11/12 Regression] ICE on attribute nonnull and erroneous type
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
                   ` (2 preceding siblings ...)
  2021-05-27 16:00 ` [Bug c/100783] [10/11/12 Regression] ICE on attribute nonnull and erroneous type msebor at gcc dot gnu.org
@ 2021-06-04 17:23 ` cvs-commit at gcc dot gnu.org
  2021-06-04 17:24 ` [Bug c/100783] [10/11 " msebor at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-04 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:5328cad24f7460a39b2def12bb9b62be36c92a54

commit r12-1221-g5328cad24f7460a39b2def12bb9b62be36c92a54
Author: Martin Sebor <msebor@redhat.com>
Date:   Fri Jun 4 11:21:51 2021 -0600

    PR c/100783 - ICE on -Wnonnull and erroneous type

    gcc/c-family/ChangeLog:

            PR c/100783
            * c-attribs.c (positional_argument): Bail on erroneous types.

    gcc/c/ChangeLog:

            PR c/100783
            * c-objc-common.c (print_type): Handle erroneous types.

    gcc/testsuite/ChangeLog:

            PR c/100783
            * gcc.dg/nonnull-6.c: New test.

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

* [Bug c/100783] [10/11 Regression] ICE on attribute nonnull and erroneous type
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
                   ` (3 preceding siblings ...)
  2021-06-04 17:23 ` cvs-commit at gcc dot gnu.org
@ 2021-06-04 17:24 ` msebor at gcc dot gnu.org
  2021-06-17 20:08 ` cvs-commit at gcc dot gnu.org
  2021-06-17 20:10 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-06-04 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|12.0                        |
            Summary|[10/11/12 Regression] ICE   |[10/11 Regression] ICE on
                   |on attribute nonnull and    |attribute nonnull and
                   |erroneous type              |erroneous type

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed in GCC 12.

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

* [Bug c/100783] [10/11 Regression] ICE on attribute nonnull and erroneous type
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
                   ` (4 preceding siblings ...)
  2021-06-04 17:24 ` [Bug c/100783] [10/11 " msebor at gcc dot gnu.org
@ 2021-06-17 20:08 ` cvs-commit at gcc dot gnu.org
  2021-06-17 20:10 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-17 20:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Sebor
<msebor@gcc.gnu.org>:

https://gcc.gnu.org/g:3863203bf306a730482861e974ff779e0d1db02f

commit r11-8605-g3863203bf306a730482861e974ff779e0d1db02f
Author: Martin Sebor <msebor@redhat.com>
Date:   Thu Jun 17 12:17:02 2021 -0600

    PR c/100783 - ICE on -Wnonnull and erroneous type

    gcc/c-family/ChangeLog:

            PR c/100783
            * c-attribs.c (positional_argument): Bail on erroneous types.

    gcc/c/ChangeLog:

            PR c/100783
            * c-objc-common.c (print_type): Handle erroneous types.

    gcc/testsuite/ChangeLog:

            PR c/100783
            * gcc.dg/nonnull-6.c: New test.

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

* [Bug c/100783] [10/11 Regression] ICE on attribute nonnull and erroneous type
  2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
                   ` (5 preceding siblings ...)
  2021-06-17 20:08 ` cvs-commit at gcc dot gnu.org
@ 2021-06-17 20:10 ` msebor at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-06-17 20:10 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Backported to GCC 11.2.

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

end of thread, other threads:[~2021-06-17 20:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  1:15 [Bug c/100783] New: ICE: at c/c-objc-common.c:188 cnsun at uwaterloo dot ca
2021-05-27  3:22 ` [Bug c/100783] [11/12 Regression] ICE while printing out error message with nonnull attribute and undeclared decl in an array size in parameter pinskia at gcc dot gnu.org
2021-05-27 14:50 ` [Bug c/100783] [10/11/12 " msebor at gcc dot gnu.org
2021-05-27 16:00 ` [Bug c/100783] [10/11/12 Regression] ICE on attribute nonnull and erroneous type msebor at gcc dot gnu.org
2021-06-04 17:23 ` cvs-commit at gcc dot gnu.org
2021-06-04 17:24 ` [Bug c/100783] [10/11 " msebor at gcc dot gnu.org
2021-06-17 20:08 ` cvs-commit at gcc dot gnu.org
2021-06-17 20:10 ` msebor 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).