* varasm.c (initializer_constant_valid_p): Call
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Feb 2000 04:25:11 +0000 (04:25 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Feb 2000 04:25:11 +0000 (04:25 +0000)
lang_expand_constant to simplify the constant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32084 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/varasm.c

index c45eb87..c3f8de6 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-20  Mark Mitchell  <mark@codesourcery.com>
+
+       * varasm.c (initializer_constant_valid_p): Call
+       lang_expand_constant to simplify the constant.
+
 2000-02-20  Bruce Korb  <bkorb@gnu.org>
 
        * fixinc/inclhack.def(stdio_va_list):
index e71ba3a..992a3a3 100644 (file)
@@ -4025,6 +4025,11 @@ initializer_constant_valid_p (value, endtype)
      tree value;
      tree endtype;
 {
+  /* Give the front-end a chance to convert VALUE to something that
+     looks more like a constant to the back-end.  */
+  if (lang_expand_constant)
+    value = (*lang_expand_constant) (value);
+
   switch (TREE_CODE (value))
     {
     case CONSTRUCTOR: