aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-01-14 09:38:56 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-01-14 09:38:56 +0000
commit429c98c9a813a425c325f992126c365898f56d94 (patch)
treef35899242f5d0af9ead5635e9b04bc5ccfe15035 /gcc/gimple.c
parent3c7c0158052509c4d4a0a7983c7ebf821551443c (diff)
downloadgcc-429c98c9a813a425c325f992126c365898f56d94.zip
gcc-429c98c9a813a425c325f992126c365898f56d94.tar.gz
gcc-429c98c9a813a425c325f992126c365898f56d94.tar.bz2
re PR lto/42665 (Internal compiler exception in with gfortran when using -fwhole-program -flto -fopenmp)
2010-01-14 Richard Guenther <rguenther@suse.de> PR lto/42665 * gimple.c (iterative_hash_gimple_type): Avoid hashing error_mark_node. From-SVN: r155885
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 3ee15b5..dce5ba5 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3707,8 +3707,12 @@ iterative_hash_gimple_type (tree type, hashval_t val,
/* For integer types hash the types min/max values and the string flag. */
if (TREE_CODE (type) == INTEGER_TYPE)
{
- v = iterative_hash_expr (TYPE_MIN_VALUE (type), v);
- v = iterative_hash_expr (TYPE_MAX_VALUE (type), v);
+ /* OMP lowering can introduce error_mark_node in place of
+ random local decls in types. */
+ if (TYPE_MIN_VALUE (type) != error_mark_node)
+ v = iterative_hash_expr (TYPE_MIN_VALUE (type), v);
+ if (TYPE_MAX_VALUE (type) != error_mark_node)
+ v = iterative_hash_expr (TYPE_MAX_VALUE (type), v);
v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
}