diff options
author | reichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-01 20:33:37 +0000 |
---|---|---|
committer | reichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-01 20:33:37 +0000 |
commit | fa3b771a61c31955c58569a2827b83831e24ee15 (patch) | |
tree | 132c9feffc06431a45597cb1317e19073a9c2b8d /gcc/c-format.c | |
parent | dbec73a5931bce2bc421459f1c1291033fb6a553 (diff) | |
download | gcc-fa3b771a61c31955c58569a2827b83831e24ee15.tar.gz |
PR c/35436
* c-format.c (init_dynamic_gfc_info): Ignore invalid locus type.
* gcc.dg/format/gcc_gfc-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133800 138bc75d-0d04-0410-961f-82ee72b054a4
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 13de9106f3a..d1a136f87ec 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; |