This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Question regarding bug 70584


(reposting in gcc@ and adding more information)

On Fri, May 20, 2016 at 3:43 PM, Andres Tiraboschi
<andres.tiraboschi@tallertechnologies.com> wrote:
> While analysing this bug we arrived to the following code at
> tree.c:145 (lvalue_kind):
>
>     case VAR_DECL:
>       if (TREE_READONLY (ref) && ! TREE_STATIC (ref)
>       && DECL_LANG_SPECIFIC (ref)
>       && DECL_IN_AGGR_P (ref))
>     return clk_none;
>
> That condition fails so a fall-through to the next case labels causes
> to return clk_ordinary, whereas this is about a constexpr value
> (rather than a reference).
>
> As an experiment, we forced the condition above to return clk_none and
> the bug is not reproduced.
>
> We are suspecting either that the condition is too restrictive or a
> fall-through is not intended. Why is the condition requiring
> DECL_IN_AGGR_P?

Just to provide more information: DECL_LANG_SPECIFIC is NULL and
DECL_IN_AGGR_P is false.
Can somebody provide the rationale of the condition?

Thanks,

   Daniel.

>
> Thank,
>
>     Andres.



-- 

Daniel F. Gutson
Engineering Manager

San Lorenzo 47, 3rd Floor, Office 5
CÃrdoba, Argentina

Phone:   +54 351 4217888 / +54 351 4218211
Skype:    dgutson
LinkedIn: http://ar.linkedin.com/in/danielgutson


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