From be8d9ace54533726c45253710ece156e09e147ba Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Jun 2000 14:16:24 -0700 Subject: [PATCH] * explow.c (set_mem_attributes): Do nothing for NULL type. From-SVN: r34523 --- gcc/ChangeLog | 4 ++++ gcc/explow.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0dadd30727e..1262b5408ee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-06-13 Richard Henderson + + * explow.c (set_mem_attributes): Do nothing for NULL type. + Tue Jun 13 14:45:10 2000 Jeffrey A Law (law@cygnus.com) * config/m68k/openbsd.h (ASM_SPEC): pass down options to assembler diff --git a/gcc/explow.c b/gcc/explow.c index 9f7eada363e..ff4f4c4229b 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -659,7 +659,15 @@ set_mem_attributes (ref, t, objectp) tree t; int objectp; { - tree type = TYPE_P (t) ? t : TREE_TYPE (t); + tree type; + + /* It can happen that type_for_mode was given a mode for which there + is no language-level type. In which case it returns NULL, which + we can see here. */ + if (t == NULL_TREE) + return; + + type = TYPE_P (t) ? t : TREE_TYPE (t); /* Get the alias set from the expression or type (perhaps using a front-end routine) and then copy bits from the type. */ -- 2.30.2