This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++: -fvtable-gc and -fforce-addr don't go well together


For example, add -fforce-addr to
testsuite/g++.old-deja/g++.other/crash18.C, and you'll see
an error "inconsistent operand constraints in an `asm'",
preceded by "warning: asm operand 0 probably doesn't match
constraints", since the first operand of the synthesized asm is
forced to a register.
(If you add -O2, there's only a warning; it seems to be "forced
back" to a symbol later, at least for i686-pc-linux-gnu.)

I'd like to fix this, but I don't know if it's
expand_asm_operands that needs to be tweaked (like adjusting
arguments to expand_expr for the "s" constraint), or if the
synthesized asm needs to be tweaked at the time it's generated
(in build_vtable_entry_ref), or perhaps something else.
Perhaps there are missing infrastructure bits for keeping
symbolic addresses, regardless of validity as "normal" insn
operands.

Helpful hints?

brgds, H-P

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]