aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-05-06 23:36:31 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 12:57:46 -0300
commit1cf6e9ec2b599dc2ea1119f2fd428e41e93d422d (patch)
tree13883e8b157af22e2ba0e308c9793a746035e25b /gcc/tree-inline.c
parent55c70f363fa8bd26b45e2e0f29918a0201f8c181 (diff)
downloadgcc-1cf6e9ec2b599dc2ea1119f2fd428e41e93d422d.zip
gcc-1cf6e9ec2b599dc2ea1119f2fd428e41e93d422d.tar.gz
gcc-1cf6e9ec2b599dc2ea1119f2fd428e41e93d422d.tar.bz2
c++: Don't synthesize sfk_comparison method multiple times [PR94907]
On the following testcase we ICE, because synthesize_method is called twice on the same sfk_comparison method fndecl, the first time it works fine because start_preparsed_function in that case sets both current_function_decl and cfun, but second time it is called it only sets the former and keeps cfun NULL, so we ICE when trying to store current_function_returns_value. I think it is just wrong to call synthesize_method multiple times, and most synthesize_method callers avoid that by not calling it if DECL_INITIAL is already set, so this patch does that too. 2020-05-06 Jakub Jelinek <jakub@redhat.com> PR c++/94907 * method.c (defaulted_late_check): Don't call synthesize_method on constexpr sfk_comparison if it has been called on it already. * g++.dg/cpp2a/spaceship-synth8.C: New test.
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions