summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/midipix.c5
-rw-r--r--gcc/varasm.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c
index 10d83f801..4b29c0917 100644
--- a/gcc/config/i386/midipix.c
+++ b/gcc/config/i386/midipix.c
@@ -564,6 +564,11 @@ bool midipix_asm_assemble_integer(rtx x, unsigned int size, int aligned_p)
section * sect;
const char * name;
const char * ptrsize;
+ extern int flag_constructor_decl;
+
+ /* filter out c++ constructors */
+ if (flag_constructor_decl)
+ return default_assemble_integer(x,size,aligned_p);
/* xref, xoff */
if (GET_CODE(x) == CONST) {
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 34890b338..a6cf6a798 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -104,6 +104,9 @@ static alias_set_type const_alias_set;
static bool saw_no_split_stack;
+/* whether the current symbol reference points to a constructor (element) */
+int flag_constructor_decl = 0;
+
static const char *strip_reg_name (const char *);
static int contains_pointers_p (tree);
#ifdef ASM_OUTPUT_EXTERNAL
@@ -4617,7 +4620,9 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align)
switch (TREE_CODE (exp))
{
case CONSTRUCTOR:
+ flag_constructor_decl++;
output_constructor (exp, size, align, NULL);
+ flag_constructor_decl--;
return;
case STRING_CST:
thissize = MIN ((unsigned HOST_WIDE_INT)TREE_STRING_LENGTH (exp),