From d2a9c52d6091dac5ab21b55b81536dd0116ffb44 Mon Sep 17 00:00:00 2001 From: janis Date: Tue, 11 Oct 2005 17:04:45 +0000 Subject: [PATCH] PR testsuite/24281 * gcc.dg/compat/struct-layout-1_generator.c (generate_fields): Check for null pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105243 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 949c1da..31a0574 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-10-11 Janis Johnson + + PR testsuite/24281 + * gcc.dg/compat/struct-layout-1_generator.c (generate_fields): + Check for null pointer. + 2005-10-11 Mark Mitchell PR c++/21369 diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c index 5519cf9..3454c62 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c +++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c @@ -1749,6 +1749,7 @@ generate_fields (enum FEATURE features, struct entry *e, struct entry *parent, size will result in a compiler error. */ if ((e[n].etype == ETYPE_ARRAY) + && e[n].attrib != NULL && (strncmp (e[n].attrib, "atal", 4) == 0)) e[n].attrib = NULL; } -- 2.7.4