diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-06-26 07:23:48 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-06-26 07:23:48 +0200 |
commit | 19dbbf3697cff8c0eb50b5ada203860c623f2cde (patch) | |
tree | a6622769868a44a89a7d8e275cb48301a392ef54 /gcc/gimplify.c | |
parent | 7a1df4e2d7d4c30d2fce7557ae13e23deb910f20 (diff) | |
download | gcc-19dbbf3697cff8c0eb50b5ada203860c623f2cde.zip gcc-19dbbf3697cff8c0eb50b5ada203860c623f2cde.tar.gz gcc-19dbbf3697cff8c0eb50b5ada203860c623f2cde.tar.bz2 |
re PR middle-end/22028 (ICE after invalid struct declaration)
PR middle-end/22028
* gimplify.c (gimplify_type_sizes): Check for type == error_mark_node
earlier in the function.
* gcc.dg/20050620-1.c: New test.
From-SVN: r101332
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 156e567..8bc7908 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4524,15 +4524,14 @@ gimplify_type_sizes (tree type, tree *list_p) { tree field, t; - if (type == NULL) + if (type == NULL || type == error_mark_node) return; /* We first do the main variant, then copy into any other variants. */ type = TYPE_MAIN_VARIANT (type); /* Avoid infinite recursion. */ - if (TYPE_SIZES_GIMPLIFIED (type) - || type == error_mark_node) + if (TYPE_SIZES_GIMPLIFIED (type)) return; TYPE_SIZES_GIMPLIFIED (type) = 1; |