public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058
@ 2023-05-25 12:20 averne381 at gmail dot com
  2023-05-25 12:32 ` [Bug c++/109966] [13/14 " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: averne381 at gmail dot com @ 2023-05-25 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109966
           Summary: [13.1 Regression] ICE in implify_var_or_parm_decl, à
                    gimplify.cc:3058
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: averne381 at gmail dot com
  Target Milestone: ---

Created attachment 55156
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55156&action=edit
Preprocessed reproduction

The attached code results in an ICE. It compiled and worked as expected in
gcc12.
I've tried to reduce as much as I could, but I'm still not sure what causes the
issue, sorry for being vague.

Godbolt: https://godbolt.org/z/7ndKThnx6

System: gcc version 13.1.1, on arch linux x86_64
Thanks in advance.

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

* [Bug c++/109966] [13/14 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
@ 2023-05-25 12:32 ` rguenth at gcc dot gnu.org
  2023-05-25 15:11 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-25 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.3.0
            Summary|[13.1 Regression] ICE in    |[13/14 Regression] ICE in
                   |implify_var_or_parm_decl, à |implify_var_or_parm_decl, à
                   |gimplify.cc:3058            |gimplify.cc:3058
   Target Milestone|---                         |13.2
           Priority|P3                          |P2
   Last reconfirmed|                            |2023-05-25
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
      Known to fail|                            |13.1.0
           Keywords|                            |ice-on-valid-code,
                   |                            |needs-bisection

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
#include <array>
#include <string_view>

template <typename T>
struct MpvOptionBoundedScalar {
    std::string_view name;
    T default_value = 0;
    T cur_value = default_value;
};

struct OptionHolder {
    std::array<MpvOptionBoundedScalar<double>, 3> video_zoom_options = {
        MpvOptionBoundedScalar<double>{"video-zoom",  0},
        MpvOptionBoundedScalar<double>{"video-pan-x", 0},
        MpvOptionBoundedScalar<double>{"video-pan-y", 0},
    };
};

OptionHolder o;

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

* [Bug c++/109966] [13/14 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
  2023-05-25 12:32 ` [Bug c++/109966] [13/14 " rguenth at gcc dot gnu.org
@ 2023-05-25 15:11 ` mpolacek at gcc dot gnu.org
  2023-05-25 16:22 ` mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-25 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
           Keywords|needs-bisection             |
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Oy, started with r13-765:

commit 1b661f3f5e712c951e774b3b91fffe4dac734cc7
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Apr 26 15:52:00 2022 -0400

    c++: ICE with temporary of class type in DMI [PR100252]

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

* [Bug c++/109966] [13/14 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
  2023-05-25 12:32 ` [Bug c++/109966] [13/14 " rguenth at gcc dot gnu.org
  2023-05-25 15:11 ` mpolacek at gcc dot gnu.org
@ 2023-05-25 16:22 ` mpolacek at gcc dot gnu.org
  2023-05-25 18:32 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-25 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
// PR c++/109966

struct M;
template <int _Nm> struct __array_traits {
  typedef M _Type[_Nm];
};
template <int _Nm> struct array {
  typename __array_traits<_Nm>::_Type _M_elems;
};
struct basic_string_view {
  basic_string_view(const char *);
};
struct M {
  basic_string_view name;
  int j = 42;
  int default_value = j;
};
struct S {
  array<3> arr{M{""}, {""}, {""}};
} o;

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

* [Bug c++/109966] [13/14 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
                   ` (2 preceding siblings ...)
  2023-05-25 16:22 ` mpolacek at gcc dot gnu.org
@ 2023-05-25 18:32 ` pinskia at gcc dot gnu.org
  2023-07-27  9:26 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-25 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #3)

Slightly more reduced (removing the template):
```
struct k {
  k(const char *);
};
struct M {
  k name;
  int j = 42;
  int default_value = j;
};
struct S {
  M arr[3]{M{""}, {""}, {""}};
} o;
```

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

* [Bug c++/109966] [13/14 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
                   ` (3 preceding siblings ...)
  2023-05-25 18:32 ` pinskia at gcc dot gnu.org
@ 2023-07-27  9:26 ` rguenth at gcc dot gnu.org
  2024-03-11 17:59 ` [Bug c++/109966] [13/14 Regression] ICE in gimplify_var_or_parm_decl, " mpolacek at gcc dot gnu.org
  2024-04-24 13:14 ` [Bug c++/109966] [13 " mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.2                        |13.3

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.2 is being released, retargeting bugs to GCC 13.3.

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

* [Bug c++/109966] [13/14 Regression] ICE in gimplify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
                   ` (4 preceding siblings ...)
  2023-07-27  9:26 ` rguenth at gcc dot gnu.org
@ 2024-03-11 17:59 ` mpolacek at gcc dot gnu.org
  2024-04-24 13:14 ` [Bug c++/109966] [13 " mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-03-11 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This looks like a failure of potential_prvalue_result_of to notice that there's
copy elision taking place (when initializing a field of the array arr).

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

* [Bug c++/109966] [13 Regression] ICE in gimplify_var_or_parm_decl, à gimplify.cc:3058
  2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
                   ` (5 preceding siblings ...)
  2024-03-11 17:59 ` [Bug c++/109966] [13/14 Regression] ICE in gimplify_var_or_parm_decl, " mpolacek at gcc dot gnu.org
@ 2024-04-24 13:14 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-04-24 13:14 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[13/14 Regression] ICE in   |[13 Regression] ICE in
                   |gimplify_var_or_parm_decl,  |gimplify_var_or_parm_decl,
                   |à gimplify.cc:3058          |à gimplify.cc:3058

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk with r14-9950-g60399256317807.

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

end of thread, other threads:[~2024-04-24 13:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 12:20 [Bug c++/109966] New: [13.1 Regression] ICE in implify_var_or_parm_decl, à gimplify.cc:3058 averne381 at gmail dot com
2023-05-25 12:32 ` [Bug c++/109966] [13/14 " rguenth at gcc dot gnu.org
2023-05-25 15:11 ` mpolacek at gcc dot gnu.org
2023-05-25 16:22 ` mpolacek at gcc dot gnu.org
2023-05-25 18:32 ` pinskia at gcc dot gnu.org
2023-07-27  9:26 ` rguenth at gcc dot gnu.org
2024-03-11 17:59 ` [Bug c++/109966] [13/14 Regression] ICE in gimplify_var_or_parm_decl, " mpolacek at gcc dot gnu.org
2024-04-24 13:14 ` [Bug c++/109966] [13 " mpolacek 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).