Commit 53f30316 by Ilya Enkovich Committed by Ilya Enkovich

re PR target/67405 (ICE on invalid use of struct on x86_64-linux-gnu)

gcc/

	PR target/67405
	* tree-chkp.c (chkp_find_bound_slots_1): Add NULL check.

gcc/testsuite/

	PR target/67405
	* g++.dg/pr67405.C: New test.

From-SVN: r227373
parent d4c61094
2015-09-01 Ilya Enkovich <enkovich.gnu@gmail.com>
PR target/67405
* tree-chkp.c (chkp_find_bound_slots_1): Add NULL check.
2015-09-01 Aldy Hernandez <aldyh@redhat.com> 2015-09-01 Aldy Hernandez <aldyh@redhat.com>
* trans-mem.c: Add contributed-by. * trans-mem.c: Add contributed-by.
......
2015-09-01 Ilya Enkovich <enkovich.gnu@gmail.com>
PR target/67405
* g++.dg/pr67405.C: New test.
2015-09-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2015-09-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.dg/vect/no-scevccp-outer-11.c: Don't xfail scan-tree-dump-times. * gcc.dg/vect/no-scevccp-outer-11.c: Don't xfail scan-tree-dump-times.
......
// { dg-do compile }
struct S
{
S f; // { dg-error "incomplete type" }
};
void
fn1 (S p1)
{
}
...@@ -1667,8 +1667,9 @@ chkp_find_bound_slots_1 (const_tree type, bitmap have_bound, ...@@ -1667,8 +1667,9 @@ chkp_find_bound_slots_1 (const_tree type, bitmap have_bound,
for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
if (TREE_CODE (field) == FIELD_DECL) if (TREE_CODE (field) == FIELD_DECL)
{ {
HOST_WIDE_INT field_offs HOST_WIDE_INT field_offs = 0;
= TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field)); if (DECL_FIELD_BIT_OFFSET (field))
field_offs += TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field));
if (DECL_FIELD_OFFSET (field)) if (DECL_FIELD_OFFSET (field))
field_offs += TREE_INT_CST_LOW (DECL_FIELD_OFFSET (field)) * 8; field_offs += TREE_INT_CST_LOW (DECL_FIELD_OFFSET (field)) * 8;
chkp_find_bound_slots_1 (TREE_TYPE (field), have_bound, chkp_find_bound_slots_1 (TREE_TYPE (field), have_bound,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment