This is the mail archive of the gcc-patches@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]

[PR C/79116] ICE with CilkPlus array notation and _Cilk_for (C front-end)


This is the same as pr70565 but it fails in an entirely different manner in the C front-end.

The problem here is that the parser builds an ARRAY_NOTATION_REF with a type of ptrdiff for length and stride. Later in cilkplus_extract_an_triplets we convert convert length and stride to an integer_type_node. This causes create_array_refs() to use a stride of integer_type, while the start is still a ptrdiff (verify_gimple ICE, boom).

The attached patch converts `start' to an integer_type to match the length and stride. We could either do this, or do a fold_convert if !useless_type_conversion_p in create_array_refs. I didn't want to look into cilkplus too deeply as to why we have different types, because (a) I don't care (b) we're probably going to deprecate Cilk Plus, no?

OK?

Attachment: curr
Description: Text document


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