diff options
author | Volker Reichelt <reichelt@gcc.gnu.org> | 2008-04-01 20:33:37 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2008-04-01 20:33:37 +0000 |
commit | dc197ab91c79219326ebc83e7353ac4f925e78e5 (patch) | |
tree | 132c9feffc06431a45597cb1317e19073a9c2b8d /gcc/c-format.c | |
parent | 9e9b53411e671de84ff27b5ff6062bf80d0bea56 (diff) | |
download | gcc-dc197ab91c79219326ebc83e7353ac4f925e78e5.zip gcc-dc197ab91c79219326ebc83e7353ac4f925e78e5.tar.gz gcc-dc197ab91c79219326ebc83e7353ac4f925e78e5.tar.bz2 |
re PR c/35436 (ICE with attribute "format")
PR c/35436
* c-format.c (init_dynamic_gfc_info): Ignore invalid locus type.
* gcc.dg/format/gcc_gfc-2.c: New test.
From-SVN: r133800
Diffstat (limited to 'gcc/c-format.c')
-rw-r--r-- | gcc/c-format.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-format.c b/gcc/c-format.c index 13de910..d1a136f 100644 --- a/gcc/c-format.c +++ b/gcc/c-format.c @@ -2474,7 +2474,8 @@ init_dynamic_gfc_info (void) locus = identifier_global_value (locus); if (locus) { - if (TREE_CODE (locus) != TYPE_DECL) + if (TREE_CODE (locus) != TYPE_DECL + || TREE_TYPE (locus) == error_mark_node) { error ("%<locus%> is not defined as a type"); locus = 0; |