public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
@ 2022-10-20  8:30 marxin at gcc dot gnu.org
  2022-10-20  8:30 ` [Bug c++/107329] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-20  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107329
           Summary: [13 Regression] ICE in gimplify_expr, at
                    gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

The following crashes:

$ cat oorexx.ii
struct RexxClass {
  void *operator new(unsigned long, unsigned long, const char *, RexxClass *,
                     RexxClass *);
  void operator delete(void *, unsigned long, const char *, RexxClass *,
                       RexxClass *);
  RexxClass();
};
void createInstance() { new (sizeof(RexxClass), "", 0, 0) RexxClass; }

$ g++ oorexx.ii -c
oorexx.ii: In function ‘void createInstance()’:
oorexx.ii:8:59: internal compiler error: in gimplify_expr, at gimplify.cc:17164
    8 | void createInstance() { new (sizeof(RexxClass), "", 0, 0) RexxClass; }
      |                                                           ^~~~~~~~~
0x83c8f6 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:17164
0xfbd5a2 gimplify_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:17416
0xfbd5a2 gimplify_arg(tree_node**, gimple**, unsigned int, bool)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:3504
0xfbdca4 gimplify_call_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:3786
0xfaeadf gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:16326
0xfb060c gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7213
0xfb5077 gimplify_cond_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:4540
0xfaea72 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:16311
0xfb060c gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7213
0xfb23de gimple_push_cleanup
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7082
0xfc1364 gimplify_target_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7184
0xfaeb5c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:16751
0xfb060c gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7213
0xfb0eb3 gimplify_compound_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:6406
0xfb0f59 gimplify_compound_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:6404
0xfae79d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:16344
0xfb060c gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7213
0xfae942 gimplify_cleanup_point_expr
        /home/marxin/Programming/gcc/gcc/gimplify.cc:6954
0xfae942 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:16747
0xfb060c gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.cc:7213
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] 7+ messages in thread

* [Bug c++/107329] [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
  2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
@ 2022-10-20  8:30 ` marxin at gcc dot gnu.org
  2022-11-23 12:50 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-20  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-10-20
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P1

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

* [Bug c++/107329] [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
  2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
  2022-10-20  8:30 ` [Bug c++/107329] " marxin at gcc dot gnu.org
@ 2022-11-23 12:50 ` marxin at gcc dot gnu.org
  2023-01-23 21:35 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-23 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
@Jason: May I ping this please?

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

* [Bug c++/107329] [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
  2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
  2022-10-20  8:30 ` [Bug c++/107329] " marxin at gcc dot gnu.org
  2022-11-23 12:50 ` marxin at gcc dot gnu.org
@ 2023-01-23 21:35 ` jason at gcc dot gnu.org
  2023-01-24  3:26 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2023-01-23 21:35 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

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

* [Bug c++/107329] [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
  2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-01-23 21:35 ` jason at gcc dot gnu.org
@ 2023-01-24  3:26 ` cvs-commit at gcc dot gnu.org
  2023-01-24  3:27 ` jason at gcc dot gnu.org
  2023-01-24 23:14 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-24  3:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:049a52909075117f5112971cc83952af2a818bc1

commit r13-5318-g049a52909075117f5112971cc83952af2a818bc1
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Jan 23 16:25:07 2023 -0500

    c++: TARGET_EXPR collapsing [PR107303]

    In r13-2978 I tried to eliminate TARGET_EXPR around TARGET_EXPR by
    discarding the outer one, but as in this testcase that breaks if the
    TARGET_EXPR_SLOT of the outer one is used elsewhere.  But it should always
    be safe to strip the inner one; if its slot were reused, there would be a
    COMPOUND_EXPR around the TARGET_EXPR.

    For 107329, if we're setting *walk_subtrees, we also need to fold
    TARGET_EXPR_CLEANUP.

            PR c++/107303
            PR c++/107329

    gcc/cp/ChangeLog:

            * cp-gimplify.cc (cp_fold_r) [TARGET_EXPR]: In case of double
            TARGET_EXPR, keep the outer one instead of the inner one.
            (maybe_replace_decl): New.

    gcc/testsuite/ChangeLog:

            * g++.dg/ext/builtin-shufflevector-5.C: New test.
            * g++.dg/init/new51.C: New test.

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

* [Bug c++/107329] [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
  2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-01-24  3:26 ` cvs-commit at gcc dot gnu.org
@ 2023-01-24  3:27 ` jason at gcc dot gnu.org
  2023-01-24 23:14 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2023-01-24  3:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.

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

* [Bug c++/107329] [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717
  2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-01-24  3:27 ` jason at gcc dot gnu.org
@ 2023-01-24 23:14 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-24 23:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r13-5337-gaba6416e95ab4138a0ecab0fd51e7e9329d74a45
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jan 25 00:12:46 2023 +0100

    testsuite: Fix up new51.C test on various targets [PR108533]

    The test fails on targets where size_t is not unsigned long
    due to extra diagnostics.

    As the testcase is tested in C++98 too, I'm not using decltype (sizeof 0)
    but __SIZE_TYPE__.

    2023-01-25  Jakub Jelinek  <jakub@redhat.com>

            PR c++/107329
            PR testsuite/108533
            * g++.dg/init/new51.C (size_t): New typedef.
            (RexxClass::operator new, RexxClass::operator delete): Use size_t
            instead of unsigned long.

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

end of thread, other threads:[~2023-01-24 23:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20  8:30 [Bug c++/107329] New: [13 Regression] ICE in gimplify_expr, at gimplify.cc:17118 since r13-2978-g43faf3e5445b5717 marxin at gcc dot gnu.org
2022-10-20  8:30 ` [Bug c++/107329] " marxin at gcc dot gnu.org
2022-11-23 12:50 ` marxin at gcc dot gnu.org
2023-01-23 21:35 ` jason at gcc dot gnu.org
2023-01-24  3:26 ` cvs-commit at gcc dot gnu.org
2023-01-24  3:27 ` jason at gcc dot gnu.org
2023-01-24 23:14 ` cvs-commit 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).