* [Bug c++/108967] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
@ 2023-02-28 13:00 ` jakub at gcc dot gnu.org
2023-02-28 13:52 ` ktkachov at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-28 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reproduced now, reducing and bisecting.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/108967] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
2023-02-28 13:00 ` [Bug c++/108967] " jakub at gcc dot gnu.org
@ 2023-02-28 13:52 ` ktkachov at gcc dot gnu.org
2023-02-28 14:41 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2023-02-28 13:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |aarch64
Last reconfirmed| |2023-02-28
Status|UNCONFIRMED |NEW
CC| |ktkachov at gcc dot gnu.org
Ever confirmed|0 |1
Target Milestone|--- |13.0
Keywords| |ice-on-valid-code
Known to fail| |13.0
--- Comment #2 from ktkachov at gcc dot gnu.org ---
Confirmed
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/108967] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
2023-02-28 13:00 ` [Bug c++/108967] " jakub at gcc dot gnu.org
2023-02-28 13:52 ` ktkachov at gcc dot gnu.org
@ 2023-02-28 14:41 ` jakub at gcc dot gnu.org
2023-02-28 15:38 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-28 14:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
Keywords| |ice-checking
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/cfgexpand.cc.jj 2023-02-21 11:44:48.479464567 +0100
+++ gcc/cfgexpand.cc 2023-02-28 15:33:09.806750517 +0100
@@ -5365,6 +5365,10 @@ expand_debug_expr (tree exp)
case VEC_WIDEN_MULT_ODD_EXPR:
case VEC_WIDEN_LSHIFT_HI_EXPR:
case VEC_WIDEN_LSHIFT_LO_EXPR:
+ case VEC_WIDEN_PLUS_HI_EXPR:
+ case VEC_WIDEN_PLUS_LO_EXPR:
+ case VEC_WIDEN_MINUS_HI_EXPR:
+ case VEC_WIDEN_MINUS_LO_EXPR:
case VEC_PERM_EXPR:
case VEC_DUPLICATE_EXPR:
case VEC_SERIES_EXPR:
certainly fixes this, not done yet with reduction though (so far at 300KB now).
Haven't bisected yet, but if it reproduces only on the trunk, it would be
latent
since r11-5160-g9fc9573f9a5e9432e53c when those were introduced. Though, it is
an checking ICE only, so doesn't reproduce with release branches by default
(and does the right thing then, the ICE is solely about making sure that new
trees which can be handled in expand_debug_expr are handled there).
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/108967] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (2 preceding siblings ...)
2023-02-28 14:41 ` jakub at gcc dot gnu.org
@ 2023-02-28 15:38 ` jakub at gcc dot gnu.org
2023-02-28 16:52 ` [Bug debug/108967] " jakub at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-28 15:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Somewhat reduced for -O2 -g:
template <int N>
struct A {
using T = unsigned short;
static constexpr int a = N;
};
template <int N>
struct B { using type = A<N>; };
struct C {
static constexpr int N = 16 / sizeof (short);
using type = B<N>::type;
};
template <typename, int, int> using D = C::type;
template <class U> using E = typename U::T;
template <typename, int> struct F {
unsigned short r[16 / sizeof(short)];
};
template <class U>
F<E<U>, U::a> baz (U);
template <class U>
using G = decltype(baz (U ()));
template <class U, typename T>
G<U> qux (U, T);
template <typename T, int N>
F<T, N>
boo (F<T, N> b)
{
F<T, N> a;
for (int i = 0; i < N; ++i)
a.r[i] = a.r[i] + b.r[i] < T(-1) ? a.r[i] + b.r[i] : T(-1);
return a;
}
void corge (G<A<8>>);
template <class U, class V>
void
freddy (U, V v, V)
{
corge (v);
}
template <int U, class V, int W>
struct H {
static void garply (int, int) { D<int, U, W> d; V() (int(), d); }
};
struct I;
template <int W = 1>
struct J {
template <typename T>
void operator () (T) { int m = 1; H<int{}, I, W>::garply (1, m); }
};
struct K {
void operator () (short t) { J() (t); }
};
struct I {
template <class T, class U>
void
operator () (T, U d)
{
auto a = qux (d, T()), b = qux (d, 0);
F c = boo (b);
freddy (d, c, a);
}
};
void
test ()
{
K k;
k (short ());
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (3 preceding siblings ...)
2023-02-28 15:38 ` jakub at gcc dot gnu.org
@ 2023-02-28 16:52 ` jakub at gcc dot gnu.org
2023-03-01 9:27 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-28 16:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54557
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54557&action=edit
gcc13-pr108967.patch
Full untested patch.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (4 preceding siblings ...)
2023-02-28 16:52 ` [Bug debug/108967] " jakub at gcc dot gnu.org
@ 2023-03-01 9:27 ` cvs-commit at gcc dot gnu.org
2023-03-01 9:33 ` [Bug debug/108967] [11/12 Regression] " jakub at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-01 9:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
--- Comment #6 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:520403f324a6ed8b527f39239709dd0841b992e2
commit r13-6388-g520403f324a6ed8b527f39239709dd0841b992e2
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 1 10:26:46 2023 +0100
cfgexpand: Handle WIDEN_{PLUS,MINUS}_EXPR and
VEC_WIDEN_{PLUS,MINUS}_{HI,LO}_EXPR in expand_debug_expr [PR108967]
When these tree codes were introduced, expand_debug_expr hasn't been
updated to handle them. For the VEC_*_EXPR we currently mostly punt, the
non-vector ones can be handled easily. In release compilers this doesn't
ICE, but with checking we ICE so that we make sure to handle all the needed
tree codes there.
2023-03-01 Jakub Jelinek <jakub@redhat.com>
PR debug/108967
* cfgexpand.cc (expand_debug_expr): Handle WIDEN_{PLUS,MINUS}_EXPR
and VEC_WIDEN_{PLUS,MINUS}_{HI,LO}_EXPR.
* g++.dg/debug/pr108967.C: New test.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] [11/12 Regression] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (5 preceding siblings ...)
2023-03-01 9:27 ` cvs-commit at gcc dot gnu.org
@ 2023-03-01 9:33 ` jakub at gcc dot gnu.org
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-01 9:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|internal compiler error: in |[11/12 Regression] internal
|expand_debug_expr, at |compiler error: in
|cfgexpand.cc:5450 |expand_debug_expr, at
| |cfgexpand.cc:5450
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for trunk so far.
Bisected with -O2 -g -ftree-vectorize to that r11-5160-g9fc9573f9a5e9432e53c
commit.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] [11/12 Regression] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (6 preceding siblings ...)
2023-03-01 9:33 ` [Bug debug/108967] [11/12 Regression] " jakub at gcc dot gnu.org
@ 2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:27 ` [Bug debug/108967] [11 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-19 5:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:7b9e837e769474fa5e91958dd2a479837b1176cb
commit r12-9279-g7b9e837e769474fa5e91958dd2a479837b1176cb
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 1 10:26:46 2023 +0100
cfgexpand: Handle WIDEN_{PLUS,MINUS}_EXPR and
VEC_WIDEN_{PLUS,MINUS}_{HI,LO}_EXPR in expand_debug_expr [PR108967]
When these tree codes were introduced, expand_debug_expr hasn't been
updated to handle them. For the VEC_*_EXPR we currently mostly punt, the
non-vector ones can be handled easily. In release compilers this doesn't
ICE, but with checking we ICE so that we make sure to handle all the needed
tree codes there.
2023-03-01 Jakub Jelinek <jakub@redhat.com>
PR debug/108967
* cfgexpand.cc (expand_debug_expr): Handle WIDEN_{PLUS,MINUS}_EXPR
and VEC_WIDEN_{PLUS,MINUS}_{HI,LO}_EXPR.
* g++.dg/debug/pr108967.C: New test.
(cherry picked from commit 520403f324a6ed8b527f39239709dd0841b992e2)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] [11 Regression] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (7 preceding siblings ...)
2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org
@ 2023-03-20 10:27 ` jakub at gcc dot gnu.org
2023-04-26 6:57 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-20 10:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12 Regression] internal |[11 Regression] internal
|compiler error: in |compiler error: in
|expand_debug_expr, at |expand_debug_expr, at
|cfgexpand.cc:5450 |cfgexpand.cc:5450
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 12.3 too.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] [11 Regression] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (8 preceding siblings ...)
2023-03-20 10:27 ` [Bug debug/108967] [11 " jakub at gcc dot gnu.org
@ 2023-04-26 6:57 ` rguenth at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:41 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26 6:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.0 |13.2
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] [11 Regression] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (9 preceding siblings ...)
2023-04-26 6:57 ` rguenth at gcc dot gnu.org
@ 2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:41 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:54b240621d372e63d8fcacae591e39b36634ac18
commit r11-10717-g54b240621d372e63d8fcacae591e39b36634ac18
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Mar 1 10:26:46 2023 +0100
cfgexpand: Handle WIDEN_{PLUS,MINUS}_EXPR and
VEC_WIDEN_{PLUS,MINUS}_{HI,LO}_EXPR in expand_debug_expr [PR108967]
When these tree codes were introduced, expand_debug_expr hasn't been
updated to handle them. For the VEC_*_EXPR we currently mostly punt, the
non-vector ones can be handled easily. In release compilers this doesn't
ICE, but with checking we ICE so that we make sure to handle all the needed
tree codes there.
2023-03-01 Jakub Jelinek <jakub@redhat.com>
PR debug/108967
* cfgexpand.c (expand_debug_expr): Handle WIDEN_{PLUS,MINUS}_EXPR
and VEC_WIDEN_{PLUS,MINUS}_{HI,LO}_EXPR.
* g++.dg/debug/pr108967.C: New test.
(cherry picked from commit 520403f324a6ed8b527f39239709dd0841b992e2)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/108967] [11 Regression] internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450
2023-02-28 12:14 [Bug c++/108967] New: internal compiler error: in expand_debug_expr, at cfgexpand.cc:5450 malat at debian dot org
` (10 preceding siblings ...)
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 10:41 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-03 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108967
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.4 as well.
^ permalink raw reply [flat|nested] 13+ messages in thread