https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89224

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
           Priority|P3                          |P2

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is likely that lvalue_kind of

 <parm_decl 0x7ffff7ff3180 x
    type <vector_type 0x7ffff6684bd0 __Int8x8_t
        type <integer_type 0x7ffff653b348 unsigned char public unsigned QI
            size <integer_cst 0x7ffff653d090 constant 8>
            unit-size <integer_cst 0x7ffff653d0a8 constant 1>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff653b348 precision:8 min <integer_cst 0x7ffff653d0c0 0> max <integer_cst
0x7ffff653d060 255>>
        readonly unsigned V16QI
        size <integer_cst 0x7ffff6517fd8 constant 128>
        unit-size <integer_cst 0x7ffff653d000 constant 16>
        align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff6684c78 nunits:16>
    readonly used unsigned V16QI t.ii:7:25 size <integer_cst 0x7ffff6517fd8
128> unit-size <integer_cst 0x7ffff653d000 16>
    align:128 warn_if_not_align:0 context <function_decl 0x7ffff6687a00 f>
arg-type <vector_type 0x7ffff6684bd0 __Int8x8_t>>

returns clk_ordinary and thus convert_vector_to_array_for_subscript returns
false.

And that's because

214         case PARM_DECL:
215         case RESULT_DECL:
216         case PLACEHOLDER_EXPR:
217           return clk_ordinary;

we wrap the PARM_DECL in a VIEW_CONVERT_EXPR but that just gets stripped
here.

So maybe convert_vector_to_array_for_subscript is wrong in just using
lvalue_p?

I've went here just tracing cp_build_array_ref, otherwise I know nothing
about C++ or how the c-c++-common lvalue_p should behave here.

Reply via email to