aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2006-08-04 04:58:36 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2006-08-04 04:58:36 +0000
commitf092a8668aa6d6a1a1fcc42d1b7e7c690aad598a (patch)
tree2d1cd1c342adf7eca633c52a85a1247b402a54a6 /gcc/varasm.c
parent493297e3842118cddb1d20edf855b4c9d5060d7b (diff)
downloadgcc-f092a8668aa6d6a1a1fcc42d1b7e7c690aad598a.zip
gcc-f092a8668aa6d6a1a1fcc42d1b7e7c690aad598a.tar.gz
gcc-f092a8668aa6d6a1a1fcc42d1b7e7c690aad598a.tar.bz2
re PR c++/28148 (ICE with pointer to member function initializer and cast to a different type)
PR c++/28148 * varasm.c (output_constant): Give the front end another chance to expand constants, after stripping NOPs. PR c++/28148 * g++.dg/init/ptrmem3.C: New test. From-SVN: r115919
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 1f5f43a..9837e0d 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -4048,6 +4048,9 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
code = TREE_CODE (TREE_TYPE (exp));
thissize = int_size_in_bytes (TREE_TYPE (exp));
+ /* Give the front end another chance to expand constants. */
+ exp = lang_hooks.expand_constant (exp);
+
/* Allow a constructor with no elements for any data type.
This means to fill the space with zeros. */
if (TREE_CODE (exp) == CONSTRUCTOR