diff options
author | Jason Merrill <jason@redhat.com> | 2009-11-01 01:06:42 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-11-01 01:06:42 -0400 |
commit | 691a1b27dc12ad8994c852cc26c53ca7e9a6ed39 (patch) | |
tree | 11b4c93ada4acad59776683657641eb0d287ec4c /gcc/cp/call.c | |
parent | cc1e2504141ecc80bd2f7a18641f51cd2a040247 (diff) | |
download | gcc-691a1b27dc12ad8994c852cc26c53ca7e9a6ed39.zip gcc-691a1b27dc12ad8994c852cc26c53ca7e9a6ed39.tar.gz gcc-691a1b27dc12ad8994c852cc26c53ca7e9a6ed39.tar.bz2 |
re PR c++/41754 (initializer list internal compiler segfault)
PR c++/41754
* call.c (compare_ics): Avoid bad union use when
comparing two ck_lists.
From-SVN: r153788
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index d4bdcba..463257c 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -6617,8 +6617,9 @@ compare_ics (conversion *ics1, conversion *ics2) /* We couldn't make up our minds; try to figure it out below. */ } - if (ics1->ellipsis_p) - /* Both conversions are ellipsis conversions. */ + if (ics1->ellipsis_p || ics1->kind == ck_list) + /* Both conversions are ellipsis conversions or both are building a + std::initializer_list. */ return 0; /* User-defined conversion sequence U1 is a better conversion sequence |