Commit 2bec21e 1 parent 2e7774a commit 2bec21e Copy full SHA for 2bec21e
File tree 2 files changed +20
-4
lines changed
2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -11384,6 +11384,12 @@ RefPtr<IRModule> generateIRForTranslationUnit(
11384
11384
11385
11385
if (compileRequest->getLinkage ()->m_optionSet .shouldRunNonEssentialValidation ())
11386
11386
{
11387
+ // We don't allow recursive types.
11388
+ checkForRecursiveTypes (module, compileRequest->getSink ());
11389
+
11390
+ if (compileRequest->getSink ()->getErrorCount () != 0 )
11391
+ return module;
11392
+
11387
11393
// Propagate `constexpr`-ness through the dataflow graph (and the
11388
11394
// call graph) based on constraints imposed by different instructions.
11389
11395
propagateConstExpr (module, compileRequest->getSink ());
@@ -11395,10 +11401,6 @@ RefPtr<IRModule> generateIRForTranslationUnit(
11395
11401
// instructions remain.
11396
11402
11397
11403
checkForMissingReturns (module, compileRequest->getSink ());
11398
-
11399
- // We don't allow recursive types.
11400
- checkForRecursiveTypes(module, compileRequest->getSink());
11401
-
11402
11404
// Check for invalid differentiable function body.
11403
11405
checkAutoDiffUsages (module, compileRequest->getSink ());
11404
11406
Original file line number Diff line number Diff line change
1
+ //DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target spirv
2
+
3
+ // CHECK: error 41001:
4
+
5
+ struct Outer {
6
+ Outer next; // non-pointer
7
+ int y;
8
+ };
9
+ RWStructuredBuffer<Outer> Buf;
10
+
11
+ [numthreads(1,1,1)]
12
+ void csmain() {
13
+ Buf[0].y = 0;
14
+ }
You can’t perform that action at this time.
0 commit comments