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

--- Comment #6 from anlauf at gcc dot gnu.org ---
(In reply to martin from comment #5)
> Just a question: Was this a pure diagnostic problem or did the contiguous
> flag got lost also in the real code generation.

The temporary associate variable p_ did miss the contiguous flag.

> The output line with 3x "T"
> suggests that code generation was fine

Well, if you try the committed testcase and use -fdump-tree-original,
you can see a runtime version of is_contiguous being inlined, which
determines that p_ is actually contiguous.

> (like in a call to a subroutine which
> requires a contiguous array as argument and as a consequence a temporary
> array is created due to the missing contiguous flag)?

Depends.  It could happen that argument packing is called, creating a
temporary array.  There are options to check this, e.g. -Warray-temporaries
(at compile-time) and -fcheck=array-temps (runtime).  Do not expect them
to be too reliable.

Reply via email to