[Bug ada/20593] [4.0/4.1 Regression] Simple array of string access miscompiled on x86 and x86_64 and PPC
kenner at vlsi1 dot ultra dot nyu dot edu
gcc-bugzilla@gcc.gnu.org
Tue Mar 22 22:45:00 GMT 2005
------- Additional Comments From kenner at vlsi1 dot ultra dot nyu dot edu 2005-03-22 22:45 -------
Subject: Re: [4.0/4.1 Regression] Simple array of string access miscompiled on x86 and x86_64 and PPC
Here's the fix. Will check in shortly. Note that the handling of
'Unrestricted_Access in Gigi isn't what the front end expects. That's a
simple fix that will also fix this problem, but the below is also a good
idea ...
*** varasm.c 22 Mar 2005 01:10:54 -0000 1.485
--- varasm.c 22 Mar 2005 22:04:45 -0000
*************** compute_reloc_for_constant (tree exp)
*** 3363,3366 ****
--- 3363,3367 ----
case CONVERT_EXPR:
case NON_LVALUE_EXPR:
+ case VIEW_CONVERT_EXPR:
reloc = compute_reloc_for_constant (TREE_OPERAND (exp, 0));
break;
*************** output_addressed_constants (tree exp)
*** 3419,3422 ****
--- 3420,3424 ----
case CONVERT_EXPR:
case NON_LVALUE_EXPR:
+ case VIEW_CONVERT_EXPR:
output_addressed_constants (TREE_OPERAND (exp, 0));
break;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20593
More information about the Gcc-bugs
mailing list