[RFC] Fix PR 43564

Jie Zhang jie@codesourcery.com
Mon Mar 29 18:20:00 GMT 2010


On 03/30/2010 01:14 AM, H.J. Lu wrote:
> On Mon, Mar 29, 2010 at 6:10 AM, Jie Zhang<jie@codesourcery.com>  wrote:
>> On 03/29/2010 05:29 PM, Richard Guenther wrote:
>>>
>>> On Mon, Mar 29, 2010 at 9:42 AM, Jie Zhang<jie@codesourcery.com>    wrote:
>>>>
>>>> At the end of decode_options, flag_var_tracking is still
>>>> AUTODETECT_VALUE,
>>>> which is 2. It's set to 0 in process_options if we pass no options in
>>>> command line. Currently. we create optimization_default_node at the end
>>>> of
>>>> decode_options. So flag_var_tracking is recorded as 2 in
>>>> optimization_default_node. After processing a function with optimize
>>>> attribute, options are reset to optimization_default_node, which set
>>>> flag_var_tracking to 2. Thus var_location and debug_insn will be
>>>> generated
>>>> for the next functions, although we pass no debug options in command
>>>> line.
>>>> Then if the function with var_location is inlined into a function with
>>>> optimize attribute. the tree operand of var_location will have no chance
>>>> to
>>>> be expanded into RTL and eventually cause an ICE.
>>>>
>>>> To fix this bug, this patch just move initialization of
>>>> optimization_default_node from decode_options to process_options, where
>>>> flag_var_tracking and friends have been initialized properly.
>>>>
>>>> Regression testing has not been done yet.
>>>>
>>>> Is it OK if no regressions?
>>>
>>> Ok.
>>>
>> Thanks! Committed as bootstrapping and testing with
>> --enable-languages=c,c++,objc,fortran on x86_64 has no regressions.
>>
>
> This patch caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43574
>
> You should enable LTO when you do testing.
>
Sorry. I have re-set up my testing. I will take a look when testing is done.


Jie



More information about the Gcc-patches mailing list