* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
@ 2020-05-03 18:56 ` foss at grueninger dot de
2020-05-03 19:02 ` foss at grueninger dot de
` (21 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-03 18:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #1 from Christoph <foss at grueninger dot de> ---
Created attachment 48433
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48433&action=edit
S file
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
2020-05-03 18:56 ` [Bug c++/94937] " foss at grueninger dot de
@ 2020-05-03 19:02 ` foss at grueninger dot de
2020-05-04 5:35 ` marxin at gcc dot gnu.org
` (20 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-03 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #2 from Christoph <foss at grueninger dot de> ---
Created attachment 48434
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48434&action=edit
Pre-processed source code
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
2020-05-03 18:56 ` [Bug c++/94937] " foss at grueninger dot de
2020-05-03 19:02 ` foss at grueninger dot de
@ 2020-05-04 5:35 ` marxin at gcc dot gnu.org
2020-05-04 7:03 ` foss at grueninger dot de
` (19 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-04 5:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2020-05-04
Status|UNCONFIRMED |WAITING
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Can't reproduce, you may hit of out memory. Can you please provide full command
line used?
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (2 preceding siblings ...)
2020-05-04 5:35 ` marxin at gcc dot gnu.org
@ 2020-05-04 7:03 ` foss at grueninger dot de
2020-05-04 7:12 ` marxin at gcc dot gnu.org
` (18 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-04 7:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #4 from Christoph <foss at grueninger dot de> ---
Command line is part of output.txt
> Am 04.05.2020 um 07:35 schrieb marxin at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
>
> Martin Liška <marxin at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |marxin at gcc dot gnu.org
> Ever confirmed|0 |1
> Last reconfirmed| |2020-05-04
> Status|UNCONFIRMED |WAITING
>
> --- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
> Can't reproduce, you may hit of out memory. Can you please provide full command
> line used?
>
> --
> You are receiving this mail because:
> You reported the bug.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (3 preceding siblings ...)
2020-05-04 7:03 ` foss at grueninger dot de
@ 2020-05-04 7:12 ` marxin at gcc dot gnu.org
2020-05-04 7:24 ` foss at grueninger dot de
` (17 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-04 7:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
But the attachment was removed.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (4 preceding siblings ...)
2020-05-04 7:12 ` marxin at gcc dot gnu.org
@ 2020-05-04 7:24 ` foss at grueninger dot de
2020-05-04 8:05 ` marxin at gcc dot gnu.org
` (16 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-04 7:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #6 from Christoph <foss at grueninger dot de> ---
Created attachment 48435
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48435&action=edit
Command line and output
Sorry, I wasn't aware that I at some point deleted the file.
Just to be sure, here my command:
> cd /home/kiko/dune/complete/dumux/build-cmake/test/multidomain/boundary/stokesdarcy/1p2c_1p2c && /usr/bin/g++-10 -v -save-temps -DENABLE_SUITESPARSE=1 -DENABLE_SUPERLU=1 -DENABLE_TBB=1 -DENABLE_UG=1 -DHAVE_CONFIG_H -DUG_USE_NEW_DIMENSION_DEFINES -D_TBB_CPP0X -I/home/kiko/dune/complete/dumux/build-cmake -I/home/kiko/dune/complete/dumux -I/usr/include/python3.6m -I/home/kiko/dune/complete/dune-common -I/home/kiko/dune/complete/dune-geometry -I/home/kiko/dune/complete/dune-uggrid -I/home/kiko/dune/complete/dune-typetree -I/home/kiko/dune/complete/dune-istl -I/home/kiko/dune/complete/dune-grid -I/home/kiko/dune/complete/dune-localfunctions -I/home/kiko/dune/complete/dune-functions -I/home/kiko/dune/complete/dune-alugrid -I/home/kiko/dune/zusatz/metis-5.1.0/include -I/usr/include/suitesparse -std=c++17 -Wall -Wunused -Wmissing-include-dirs -Wcast-align -Wno-sign-compare -Wno-cast-align -Wall -pedantic -Wno-inconsistent-missing-override -O2 -Wno-unused-parameter -fno-strict-aliasing -fstrict-overflow -g -fext-numeric-literals -fPIE -o CMakeFiles/test_md_boundary_darcy1p2c_stokes1p2c.dir/main.cc.o -c /home/kiko/dune/complete/dumux/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/main.cc
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000)
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (5 preceding siblings ...)
2020-05-04 7:24 ` foss at grueninger dot de
@ 2020-05-04 8:05 ` marxin at gcc dot gnu.org
2020-05-04 18:43 ` [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef marxin at gcc dot gnu.org
` (15 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-04 8:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed! I'm reducing that right now.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (6 preceding siblings ...)
2020-05-04 8:05 ` marxin at gcc dot gnu.org
@ 2020-05-04 18:43 ` marxin at gcc dot gnu.org
2020-05-04 18:43 ` marxin at gcc dot gnu.org
` (14 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-04 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE with if constexpr (in |[10/11 Regression] ICE with
|cp_get_fndecl_from_callee, |if constexpr (in
|at cp/cvt.c:1000) |cp_get_fndecl_from_callee,
| |at cp/cvt.c:1000) since
| |r10-2835-g14da3939da3adcef
Known to fail| |10.0, 11.0
Keywords| |ice-on-valid-code
CC| |mpolacek at gcc dot gnu.org
Known to work| |9.3.0
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced command line:
$ g++ -c -c -std=c++17 -Wall -fsyntax-only -c pr94937.ii
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (7 preceding siblings ...)
2020-05-04 18:43 ` [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef marxin at gcc dot gnu.org
@ 2020-05-04 18:43 ` marxin at gcc dot gnu.org
2020-05-04 19:32 ` mpolacek at gcc dot gnu.org
` (13 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-04 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 48444
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48444&action=edit
Semi-reduced test-case
I'll carry on with the reduction, but it goes down slowly.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (8 preceding siblings ...)
2020-05-04 18:43 ` marxin at gcc dot gnu.org
@ 2020-05-04 19:32 ` mpolacek at gcc dot gnu.org
2020-05-04 23:35 ` foss at grueninger dot de
` (12 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-04 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
--- Comment #10 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Mine. A reduced test would be very much appreciated, thanks Martin.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (9 preceding siblings ...)
2020-05-04 19:32 ` mpolacek at gcc dot gnu.org
@ 2020-05-04 23:35 ` foss at grueninger dot de
2020-05-04 23:36 ` foss at grueninger dot de
` (11 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-04 23:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #11 from Christoph <foss at grueninger dot de> ---
Created attachment 48446
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48446&action=edit
New, smaller test case (called injection)
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (10 preceding siblings ...)
2020-05-04 23:35 ` foss at grueninger dot de
@ 2020-05-04 23:36 ` foss at grueninger dot de
2020-05-04 23:38 ` foss at grueninger dot de
` (10 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-04 23:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #12 from Christoph <foss at grueninger dot de> ---
Created attachment 48447
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48447&action=edit
output for injection test case
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (11 preceding siblings ...)
2020-05-04 23:36 ` foss at grueninger dot de
@ 2020-05-04 23:38 ` foss at grueninger dot de
2020-05-05 4:12 ` marxin at gcc dot gnu.org
` (9 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: foss at grueninger dot de @ 2020-05-04 23:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #13 from Christoph <foss at grueninger dot de> ---
I tried to help with reducing the test case, but could not achieve something
substantial.
Then I went back to our test cases and tried to pick the simples one I could
find. I removed as much code from main() as I could. The resulting test case
looks only slightly smaller (7 MiB instead of 8 MiB) but it should boil down to
a smaller test case. Not sure which route is going to lead to faster results.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (12 preceding siblings ...)
2020-05-04 23:38 ` foss at grueninger dot de
@ 2020-05-05 4:12 ` marxin at gcc dot gnu.org
2020-05-05 9:39 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-05 4:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 48448
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48448&action=edit
Reduced test-case
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (13 preceding siblings ...)
2020-05-05 4:12 ` marxin at gcc dot gnu.org
@ 2020-05-05 9:39 ` rguenth at gcc dot gnu.org
2020-05-05 19:16 ` mpolacek at gcc dot gnu.org
` (7 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-05 9:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.2
Priority|P3 |P2
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (14 preceding siblings ...)
2020-05-05 9:39 ` rguenth at gcc dot gnu.org
@ 2020-05-05 19:16 ` mpolacek at gcc dot gnu.org
2020-05-05 19:26 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-05 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #15 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Reduced:
struct B {
static constexpr bool foo() { return false; }
};
template<typename T>
struct C {
static void bar ()
{
if constexpr (B::foo()) ;
}
};
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (15 preceding siblings ...)
2020-05-05 19:16 ` mpolacek at gcc dot gnu.org
@ 2020-05-05 19:26 ` jakub at gcc dot gnu.org
2020-05-05 19:52 ` mpolacek at gcc dot gnu.org
` (5 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-05 19:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I remember dealing with this elsewhere (in declare variant support).
I had to do:
- variant = cp_get_callee_fndecl_nofold (variant);
+ variant = cp_get_callee (variant);
+ if (variant)
+ {
+ if (TREE_CODE (variant) == FUNCTION_DECL)
+ ;
+ else if (TREE_TYPE (variant) && INDIRECT_TYPE_P (TREE_TYPE (variant)))
+ variant = cp_get_fndecl_from_callee (variant, false);
+ else
+ variant = NULL_TREE;
+ }
because cp_get_callee_fndecl_nofold would ICE (I think exactly like this one))
when feeded during processing_template_decl with something it doesn't expect to
see.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (16 preceding siblings ...)
2020-05-05 19:26 ` jakub at gcc dot gnu.org
@ 2020-05-05 19:52 ` mpolacek at gcc dot gnu.org
2020-05-05 20:58 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-05 19:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #17 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ah, omp_declare_variant_finalize_one. I think I'll do something similar, but
not the same: if we see a CALL_EXPR whose CALL_EXPR_FN is a BASELINK, we know
it's not the std::is_constant_evaluated call we're looking for. Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (17 preceding siblings ...)
2020-05-05 19:52 ` mpolacek at gcc dot gnu.org
@ 2020-05-05 20:58 ` mpolacek at gcc dot gnu.org
2020-05-18 22:59 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-05 20:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #18 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Actually it might be better to make it out to a function and use that in both
places, otherwise I'm either duplicating code or it's just too ugly.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10/11 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (18 preceding siblings ...)
2020-05-05 20:58 ` mpolacek at gcc dot gnu.org
@ 2020-05-18 22:59 ` cvs-commit at gcc dot gnu.org
2020-05-18 22:59 ` [Bug c++/94937] [10 " mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-18 22:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:bf732686c0b9c42a2fe119db774c5a65e5a97174
commit r11-473-gbf732686c0b9c42a2fe119db774c5a65e5a97174
Author: Marek Polacek <polacek@redhat.com>
Date: Wed May 6 19:24:58 2020 -0400
c++: ICE with -Wall and constexpr if [PR94937]
An ICE arises here because we call cp_get_callee_fndecl_nofold in a
template, and we've got a CALL_EXPR whose CALL_EXPR_FN is a BASELINK.
This tickles the INDIRECT_TYPE_P assert in cp_get_fndecl_from_callee.
Fixed by turning the assert into a condition and returning NULL_TREE
in that case.
PR c++/94937
* cvt.c (cp_get_fndecl_from_callee): Return NULL_TREE if the
function
type is not INDIRECT_TYPE_P.
* decl.c (omp_declare_variant_finalize_one): Call
cp_get_callee_fndecl_nofold instead of looking for the function
decl
manually.
* g++.dg/cpp1z/constexpr-if34.C: New test.
* g++.dg/cpp2a/is-constant-evaluated10.C: New test.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (19 preceding siblings ...)
2020-05-18 22:59 ` cvs-commit at gcc dot gnu.org
@ 2020-05-18 22:59 ` mpolacek at gcc dot gnu.org
2020-06-11 20:30 ` cvs-commit at gcc dot gnu.org
2020-06-11 20:30 ` mpolacek at gcc dot gnu.org
22 siblings, 0 replies; 24+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-05-18 22:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11 Regression] ICE with |[10 Regression] ICE with if
|if constexpr (in |constexpr (in
|cp_get_fndecl_from_callee, |cp_get_fndecl_from_callee,
|at cp/cvt.c:1000) since |at cp/cvt.c:1000) since
|r10-2835-g14da3939da3adcef |r10-2835-g14da3939da3adcef
--- Comment #20 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (20 preceding siblings ...)
2020-05-18 22:59 ` [Bug c++/94937] [10 " mpolacek at gcc dot gnu.org
@ 2020-06-11 20:30 ` cvs-commit at gcc dot gnu.org
2020-06-11 20:30 ` mpolacek at gcc dot gnu.org
22 siblings, 0 replies; 24+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-11 20:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:de946847b7cf88c503c6e843fc6263ef7a1911fc
commit r10-8279-gde946847b7cf88c503c6e843fc6263ef7a1911fc
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Jun 11 16:29:57 2020 -0400
c++: ICE with -Wall and constexpr if [PR94937]
An ICE arises here because we call cp_get_callee_fndecl_nofold in a
template, and we've got a CALL_EXPR whose CALL_EXPR_FN is a BASELINK.
This tickles the INDIRECT_TYPE_P assert in cp_get_fndecl_from_callee.
Fixed by turning the assert into a condition and returning NULL_TREE
in that case.
PR c++/94937
* cvt.c (cp_get_fndecl_from_callee): Return NULL_TREE if the
function
type is not INDIRECT_TYPE_P.
* decl.c (omp_declare_variant_finalize_one): Call
cp_get_callee_fndecl_nofold instead of looking for the function
decl
manually.
* g++.dg/cpp1z/constexpr-if34.C: New test.
* g++.dg/cpp2a/is-constant-evaluated10.C: New test.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/94937] [10 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
2020-05-03 18:52 [Bug c++/94937] New: ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) foss at grueninger dot de
` (21 preceding siblings ...)
2020-06-11 20:30 ` cvs-commit at gcc dot gnu.org
@ 2020-06-11 20:30 ` mpolacek at gcc dot gnu.org
22 siblings, 0 replies; 24+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-06-11 20:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #22 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 24+ messages in thread