================ @@ -0,0 +1,72 @@ +! Tests that -finit-local= byte-fill loops correctly handle volatile locals. +! Each byte-view conversion must go through fir.volatile_cast before the +! fir.convert that reinterprets the address as a byte sequence, so that the +! strict FIR volatile verifier does not see a "mismatched volatility" error. +! +! Before the fix both zero and hex modes emitted a plain fir.convert from +! a volatile ref directly to a non-volatile byte-sequence ref, which the +! strict verifier rejects with "mismatched volatility". +! +! Two shapes are covered: +! 1. volatile derived-type local -- exercises the record byte-fill loop +! in initAddr (fir.volatile_cast before the i8-array view convert). +! 2. volatile real(10) local -- exercises the allocation-gap byte-fill +! loop in genInitLocalStore (same fix, different site). +! Requires x86 so that real(10) = x86_fp80 with a 6-byte padding gap. +! +! RUN: %flang_fc1 -emit-hlfir -mmlir --strict-fir-volatile-verifier \ ---------------- MattPD wrote:
Confirmed: the REAL(10) case no longer depends on the host triple. https://github.com/llvm/llvm-project/pull/216164 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
