public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052
@ 2021-02-23 18:27 gscfq@t-online.de
  2021-02-24  8:14 ` [Bug c/99224] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2021-02-23 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99224
           Summary: [9/10/11 Regression] ICE in location_wrapper_p, at
                    tree.h:4052
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to r6 :


$ cat z1.c
void f (char *c, ...)
{
  __builtin_next_arg (*c);
}


$ gcc-11-20210221 -c z1.c
during RTL pass: expand
z1.c: In function 'f':
z1.c:3:3: internal compiler error: Segmentation fault
    3 |   __builtin_next_arg (*c);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
0xb5eaff crash_signal
        ../../gcc/toplev.c:327
0xdd3254 location_wrapper_p(tree_node const*)
        ../../gcc/tree.h:4052
0xdd3254 tree_strip_any_location_wrapper(tree_node*)
        ../../gcc/tree.h:4064
0xdd3254 integer_zerop(tree_node const*)
        ../../gcc/tree.c:2664
0x72d9c7 fold_builtin_next_arg(tree_node*, bool)
        ../../gcc/builtins.c:12606
0x73a149 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        ../../gcc/builtins.c:9725
0x85d220 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/expr.c:11276
0x75e65a expand_expr
        ../../gcc/expr.h:282
0x75e65a expand_call_stmt
        ../../gcc/cfgexpand.c:2840
0x75e65a expand_gimple_stmt_1
        ../../gcc/cfgexpand.c:3844
0x75e65a expand_gimple_stmt
        ../../gcc/cfgexpand.c:4008
0x763237 expand_gimple_basic_block
        ../../gcc/cfgexpand.c:6045
0x76596e execute
        ../../gcc/cfgexpand.c:6729

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

* [Bug c/99224] [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052
  2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
@ 2021-02-24  8:14 ` rguenth at gcc dot gnu.org
  2021-02-24  9:25 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-24  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.4
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-02-24

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
  if (TREE_CODE (arg) == SSA_NAME)
    arg = SSA_NAME_VAR (arg);

but that can resultin a NULL arg.

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

* [Bug c/99224] [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052
  2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
  2021-02-24  8:14 ` [Bug c/99224] " rguenth at gcc dot gnu.org
@ 2021-02-24  9:25 ` cvs-commit at gcc dot gnu.org
  2021-02-24  9:26 ` [Bug c/99224] [9/10 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-24  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:084963dcaca2f0836366fdb001561e29ecbfb483

commit r11-7353-g084963dcaca2f0836366fdb001561e29ecbfb483
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Feb 24 09:18:05 2021 +0100

    c/99224 - avoid ICEing on invalid __builtin_next_arg

    This avoids crashes with __builtin_next_arg on non-parameters.  For
    the specific testcase we arrive with an anonymous SSA_NAME so that
    SSA_NAME_VAR becomes NULL and we crash.

    2021-02-24  Richard Biener  <rguenther@suse.de>

            PR c/99224
            * builtins.c (fold_builtin_next_arg): Avoid NULL arg.

            * gcc.dg/pr99224.c: New testcase.

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

* [Bug c/99224] [9/10 Regression] ICE in location_wrapper_p, at tree.h:4052
  2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
  2021-02-24  8:14 ` [Bug c/99224] " rguenth at gcc dot gnu.org
  2021-02-24  9:25 ` cvs-commit at gcc dot gnu.org
@ 2021-02-24  9:26 ` rguenth at gcc dot gnu.org
  2021-03-16 14:02 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-24  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
            Summary|[9/10/11 Regression] ICE in |[9/10 Regression] ICE in
                   |location_wrapper_p, at      |location_wrapper_p, at
                   |tree.h:4052                 |tree.h:4052
      Known to work|                            |11.0
           Keywords|                            |ice-on-invalid-code

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

* [Bug c/99224] [9/10 Regression] ICE in location_wrapper_p, at tree.h:4052
  2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-02-24  9:26 ` [Bug c/99224] [9/10 " rguenth at gcc dot gnu.org
@ 2021-03-16 14:02 ` cvs-commit at gcc dot gnu.org
  2021-04-12 11:23 ` [Bug c/99224] [9 " cvs-commit at gcc dot gnu.org
  2021-04-12 11:24 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-16 14:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:7e9c43ce0d7b5ef1a1f11bf91d1a06614460b7d8

commit r10-9448-g7e9c43ce0d7b5ef1a1f11bf91d1a06614460b7d8
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Feb 24 09:18:05 2021 +0100

    c/99224 - avoid ICEing on invalid __builtin_next_arg

    This avoids crashes with __builtin_next_arg on non-parameters.  For
    the specific testcase we arrive with an anonymous SSA_NAME so that
    SSA_NAME_VAR becomes NULL and we crash.

    2021-02-24  Richard Biener  <rguenther@suse.de>

            PR c/99224
            * builtins.c (fold_builtin_next_arg): Avoid NULL arg.

            * gcc.dg/pr99224.c: New testcase.

    (cherry picked from commit 084963dcaca2f0836366fdb001561e29ecbfb483)

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

* [Bug c/99224] [9 Regression] ICE in location_wrapper_p, at tree.h:4052
  2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-03-16 14:02 ` cvs-commit at gcc dot gnu.org
@ 2021-04-12 11:23 ` cvs-commit at gcc dot gnu.org
  2021-04-12 11:24 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-12 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:c7712377876cb7e6c3ca3ce479245c6386dfc9a6

commit r9-9342-gc7712377876cb7e6c3ca3ce479245c6386dfc9a6
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Feb 24 09:18:05 2021 +0100

    c/99224 - avoid ICEing on invalid __builtin_next_arg

    This avoids crashes with __builtin_next_arg on non-parameters.  For
    the specific testcase we arrive with an anonymous SSA_NAME so that
    SSA_NAME_VAR becomes NULL and we crash.

    2021-02-24  Richard Biener  <rguenther@suse.de>

            PR c/99224
            * builtins.c (fold_builtin_next_arg): Avoid NULL arg.

            * gcc.dg/pr99224.c: New testcase.

    (cherry picked from commit 084963dcaca2f0836366fdb001561e29ecbfb483)

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

* [Bug c/99224] [9 Regression] ICE in location_wrapper_p, at tree.h:4052
  2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2021-04-12 11:23 ` [Bug c/99224] [9 " cvs-commit at gcc dot gnu.org
@ 2021-04-12 11:24 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-12 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|                            |9.3.0

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-04-12 11:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 18:27 [Bug c/99224] New: [9/10/11 Regression] ICE in location_wrapper_p, at tree.h:4052 gscfq@t-online.de
2021-02-24  8:14 ` [Bug c/99224] " rguenth at gcc dot gnu.org
2021-02-24  9:25 ` cvs-commit at gcc dot gnu.org
2021-02-24  9:26 ` [Bug c/99224] [9/10 " rguenth at gcc dot gnu.org
2021-03-16 14:02 ` cvs-commit at gcc dot gnu.org
2021-04-12 11:23 ` [Bug c/99224] [9 " cvs-commit at gcc dot gnu.org
2021-04-12 11:24 ` rguenth 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).