This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
- From: "ramrad01 at arm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Mar 2014 10:04:29 +0000
- Subject: [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
- Auto-submitted: auto-generated
- References: <bug-60655-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655
--- Comment #6 from ramrad01 at arm dot com ---
On 03/26/14 09:46, jakub at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655
>
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |jakub at gcc dot gnu.org
>
> --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> As discussed yesterday with Ramana on IRC, my suggested fix for this for 4.9 is
> something like:
> --- gcc/dwarf2out.c 2014-03-03 08:24:14.841895755 +0100
> +++ gcc/dwarf2out.c 2014-03-26 10:42:32.027508796 +0100
> @@ -11326,7 +11326,12 @@ const_ok_for_output_1 (rtx *rtlp, void *
> }
>
> if (GET_CODE (rtl) != SYMBOL_REF)
> - return 0;
> + {
> + /* NOT is not handled by output_addr_const. */
> + if (GET_CODE (rtl) == NOT)
> + return 1;
> + return 0;
> + }
I have a very similar patch under testing only with a comment linking
this to the bug report and bootstrapping and regression testing on
aarch64, armhf and x86_64.
>
> if (CONSTANT_POOL_ADDRESS_P (rtl))
> {
>
> and for 5.0 we want to gather some statistics what we actually accept as CONST
> operands in const_ok_for_output and then successfully emit it into debug info
> and assemble that, and based on that adjust const_ok_for_output or it's
> callers, so that for CONST expressions that have no chance of being assembled
> we actually ignore the CONST around the expression and try to emit it as the
> individual expressions. So, say instead of trying to emit DW_OP_addr
> (-1-symbol) in this case which won't assemble we emit it as DW_OP_const1s -1
> DW_OP_addr (symbol) DW_OP_minus.
Agreed.
regards
Ramana
>