diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-04 04:58:36 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-04 04:58:36 +0000 |
commit | 393cc65b6088b70b2e72b05c9f5ffb9e4910de3f (patch) | |
tree | 2d1cd1c342adf7eca633c52a85a1247b402a54a6 /gcc/varasm.c | |
parent | 2c783ea44d43dfd5c79f2547a99dfa0d760aefc2 (diff) | |
download | gcc-393cc65b6088b70b2e72b05c9f5ffb9e4910de3f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115919 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 1f5f43a1b4e..9837e0de147 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 |