[clang] [clang][SemaOpenACC] Avoid assertion on VLA reduction operand (PR #199178)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri May 22 06:12:12 PDT 2026


https://github.com/erichkeane requested changes to this pull request.

So a VLA here would be an extension.  Of the other compilers we have access to on godbolt, NVC++ accepts (though perhaps silently ignores?), and GCC crashes.

So the question is whether we should reject VLAs instead. I am leaning towards that we should (See CheckReductionVarType).  There isn't any reasonable IR we can generate for them.  Pointers have a similar problem, but at least there is an implied "its just a single element" thing. 

Also, your tests don't have to validate all of the reduction operations, this test doesn't depend on them.  You gotta real claude in :) 

That said, this IS missing tests for codegen in clangir mode.  OpenACC 

https://github.com/llvm/llvm-project/pull/199178


More information about the cfe-commits mailing list