From 58db7f184f3e07b73009deb3c7151f20fcc86cdd Mon Sep 17 00:00:00 2001 From: jamborm Date: Fri, 11 Dec 2015 11:27:11 +0000 Subject: Add an asssert and testcase for PR 68064 2015-12-11 Martin Jambor PR ipa/68064 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Add checking assert that align is nonzero. testsuite/ * g++.dg/torture/pr68064.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231559 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ipa-prop.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/ipa-prop.c') diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index f96bf970ee1..72c2fed63ff 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1646,6 +1646,7 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi, && align % BITS_PER_UNIT == 0 && hwi_bitpos % BITS_PER_UNIT == 0) { + gcc_checking_assert (align != 0); jfunc->alignment.known = true; jfunc->alignment.align = align / BITS_PER_UNIT; jfunc->alignment.misalign = hwi_bitpos / BITS_PER_UNIT; -- cgit v1.2.1