[PATCH, 4.6 regression]. New error: case label does not reduce

Richard Guenther richard.guenther@gmail.com
Thu Feb 16 13:15:00 GMT 2012


On Thu, Feb 16, 2012 at 12:49 PM, Christian Bruel
<christian.bruel@st.com> wrote:
>
>>
>>
>> On 02/15/2012 06:03 PM, Joseph S. Myers wrote:
>>> On Wed, 15 Feb 2012, Christian Bruel wrote:
>>>
>>>> Removal of this NOP_EXPR if !CAN_HAVE_LOCATION_P fixes the problem.
>>>> looks safe from my testing, because the loc is inserted using
>>>> 'protected_set_expr_location', whereas no loc for a constant case
>>>> doesn't seem to introduce new problems with the debugging information.
>>>> But in case I also added a few paranoid gcc_assert.
>>>
>>> Is it safe to set TREE_NO_WARNING without that check?  I'd have thought
>>> the check was to avoid setting TREE_NO_WARNING on a shared node when
>>> warnings are to be disabled in only one context where that node is used.
>
> In fact, we can't omit the TREE_NO_WARNING is !CAN_HAVE_LOCATION_P, the
> tentative bellow causes a regression on middle-end/13325.
>
> What I'm unsure is why we couldn't have a TREE_NO_WARNING on a
> !CAN_HAVE_LOCATION_P. This seems necessary on some cases without using a
> NOP_EXPR.

You cannot have it on possibly shared tree nodes. CAN_HAVE_LOCATION_P
tree nodes are not shared (the reverse is not true).

Richard.



More information about the Gcc-patches mailing list