re PR ipa/62121 (ICE: Segmentation fault in ipa-devirt.c:997)
PR ipa/62121 * ipa-polymorphic-call.c (ipa_polymorphic_call_context::restrict_to_inner_class): fix pasto in checking array size. * g++.dg/torture/pr62121.C: New testcase. From-SVN: r215655
This commit is contained in:
parent
ee5bd6c8fd
commit
ec1d732bc6
@ -1,3 +1,9 @@
|
||||
2014-09-26 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR ipa/62121
|
||||
* ipa-polymorphic-call.c (ipa_polymorphic_call_context::restrict_to_inner_class):
|
||||
fix pasto in checking array size.
|
||||
|
||||
2014-09-26 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR middle-end/35545
|
||||
|
@ -327,7 +327,7 @@ ipa_polymorphic_call_context::restrict_to_inner_class (tree expected_type)
|
||||
&& (cur_offset
|
||||
+ (expected_type ? tree_to_uhwi (TYPE_SIZE (expected_type))
|
||||
: 0)
|
||||
> tree_to_uhwi (TYPE_SIZE (type))))
|
||||
> tree_to_uhwi (TYPE_SIZE (subtype))))
|
||||
goto no_useful_type_info;
|
||||
|
||||
cur_offset = new_offset;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-09-26 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR ipa/62121
|
||||
* g++.dg/torture/pr62121.C: New testcase.
|
||||
|
||||
2014-09-26 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR middle-end/35545
|
||||
|
12
gcc/testsuite/g++.dg/torture/pr62121.C
Normal file
12
gcc/testsuite/g++.dg/torture/pr62121.C
Normal file
@ -0,0 +1,12 @@
|
||||
// { dg-do compile }
|
||||
class A
|
||||
{
|
||||
virtual double operator()();
|
||||
};
|
||||
class B : A
|
||||
{
|
||||
public:
|
||||
double operator()();
|
||||
};
|
||||
extern B a[];
|
||||
int b = a[0]();
|
Loading…
x
Reference in New Issue
Block a user