aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-09-27 02:19:06 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-09-27 00:19:06 +0000
commitec1d732bc6e08ede9c33029347d0568ca310531f (patch)
tree7fa13bcb0d321647fa8ad89c27ffffe9bde8fe46 /gcc
parentee5bd6c8fd290b4fcb4ceeb79eb5361780ecf19b (diff)
downloadgcc-ec1d732bc6e08ede9c33029347d0568ca310531f.zip
gcc-ec1d732bc6e08ede9c33029347d0568ca310531f.tar.gz
gcc-ec1d732bc6e08ede9c33029347d0568ca310531f.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-polymorphic-call.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/torture/pr62121.C12
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e3a62f5..203e1f5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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
* passes.def (pass_tracer): Move before last dominator pass.
diff --git a/gcc/ipa-polymorphic-call.c b/gcc/ipa-polymorphic-call.c
index 23f14ac60..e682b2b4 100644
--- a/gcc/ipa-polymorphic-call.c
+++ b/gcc/ipa-polymorphic-call.c
@@ -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;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd76fa5..e3396c5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
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
* g++.dg/tree-prof/pr35545.C: New testcase.
diff --git a/gcc/testsuite/g++.dg/torture/pr62121.C b/gcc/testsuite/g++.dg/torture/pr62121.C
new file mode 100644
index 0000000..de1196a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr62121.C
@@ -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]();