This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Question regarding bug 70584
- From: Andres Tiraboschi <andres dot tiraboschi at tallertechnologies dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Daniel Gutson <daniel dot gutson at tallertechnologies dot com>
- Date: Fri, 20 May 2016 15:43:46 -0300
- Subject: Question regarding bug 70584
- Authentication-results: sourceware.org; auth=none
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?
Thank,
Andres.