fortrangoingonforty/armfortas / ad548bb

Browse files

Burn down final audit xfails

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
ad548bbc108457cf2b8e8b4c559fdf383cc06df8
Parents
204993d
Tree
b0049e2

4 changed files

StatusFile+-
M .docs/sprints/sprint29_11.md 19 10
M noted_items.md 0 15
M test_programs/realworld_assumed_shape_size.f90 0 1
M test_programs/realworld_suffix_scan.f90 1 5
.docs/sprints/sprint29_11.mdmodified
@@ -49,7 +49,7 @@ Each promised item should end the audit in one of three states:
4949
 
5050
 Kickoff items:
5151
 - source-level audit for helper-before-program entry lowering / dead-function root handling
52
-- living XFAIL for module procedure host-association over module globals
52
+- source-level audit for module procedure host-association over module globals
5353
 - real-world stdlib-style kernel:
5454
   - tridiagonal sparse matvec (`realworld_tridiag_spmv.f90`)
5555
 - real-world BLAS-style kernel:
@@ -114,6 +114,23 @@ Current audit findings:
114114
   real-world default-kind array-query assignments could produce invalid asm like
115115
   `mov w21, x20`; the new runtime-shape audit keeps that truncation surface
116116
   honest
117
+- fixed: fpm-style suffix classification in `realworld_suffix_scan.f90` first
118
+  needed fixed-length character arrays to lower as real element-addressable
119
+  arrays instead of scalar strings, then needed scalar character dummy intrinsics
120
+  like `INDEX(name, suffix)` to carry a real runtime length story through
121
+  `afs_c_strlen`, and finally exposed two optimizer-side bugs: mixed-width GEP
122
+  offsets were being compared without pointee-size scaling in alias analysis,
123
+  and SROA was scalarizing aggregates even when a GEP address escaped through
124
+  the synthesized descriptor. The program is now a passing audit probe with
125
+  cross-opt equality plus IR/asm/object/run reproducibility
126
+- fixed: dummy-array `SIZE(...)` queries in `realworld_assumed_shape_size.f90`
127
+  were not actually using assumed-shape descriptors because bare `(:)` dummy
128
+  declarations lowered through the `Deferred` array-spec path, and then the
129
+  synthesized descriptor lost `rank` and `flags` at `-O2+` because mixed-width
130
+  GEP offsets in alias analysis made descriptor field stores look like they
131
+  overlapped. Assumed-shape dummies now classify as descriptor-backed, query
132
+  results are kept in default-kind scalars, and the real-world canary now
133
+  passes across optimization levels with deterministic artifacts
117134
 - proven: LICM hoists invariant scalar dummy loads out of a real-world affine
118135
   update loop in `realworld_affine_shift.f90` once BCE clears the loop body
119136
 - proven: GVN reduces duplicated branch-join PURE helper calls in
@@ -133,14 +150,6 @@ Current audit findings:
133150
   (`realworld_ipo_chain.f90`), small-loop DO CONCURRENT exploitation
134151
   (`realworld_doconc_square.f90`), and explicit-DO vectorization onto the bulk
135152
   runtime kernels (`realworld_vector_stage.f90`)
136
-- deferred with living XFAIL: `FPM-SUFFIX-1` fpm-style source suffix scan still
137
-  fails after parsing with an `i32`/`i64` IR store mismatch
138
-- deferred with living XFAIL: `ASHAPE-SIZE-1` dummy-array `SIZE(...)` lowering
139
-  still routes dummy arrays into the descriptor runtime path even though ordinary
140
-  dummy arrays are carried as base pointers today. The default-integer query
141
-  typing bug is now fixed, so the remaining failure is the real descriptor
142
-  mismatch: `realworld_assumed_shape_size.f90` reaches `afs_array_size` with
143
-  bogus dummy-array metadata and panics in the runtime
144153
 - separately deferred parser gap: typed character array constructors using an
145154
   explicit type-spec inside `[]`
146155
 
@@ -149,7 +158,7 @@ Current audit corpus snapshot:
149158
 - `172` programs with `CHECK`
150159
 - `30` programs with `IR_CHECK`
151160
 - `6` programs with `IR_NOT`
152
-- `2` living `XFAIL`s
161
+- `0` living `XFAIL`s
153162
 
154163
 ## Brutal Audit Priorities
155164
 
noted_items.mdmodified
@@ -17,20 +17,5 @@ starting the full Sprint 29 audit:
1717
   The full-sprint audit tripped this while building the fpm-inspired
1818
   `realworld_suffix_scan.f90` reproducer, which is currently written in a more
1919
   conservative source form instead of the typed constructor spelling.
20
-- Audit FPM-SUFFIX-1: the conservative `realworld_suffix_scan.f90` variant now
21
-  gets past parsing but still fails IR verification with an `i32`/`i64` store
22
-  type mismatch.
23
-  This is now a living XFAIL in the real-world audit corpus, so the Sprint 29
24
-  closeout has a standing canary for the remaining source-scanner gap.
25
-- Audit ASHAPE-SIZE-1: dummy-array `SIZE(...)` queries still flow into the
26
-  descriptor runtime path even though ordinary dummy arrays are currently
27
-  lowered as base pointers rather than descriptors.
28
-  The mixed-width query-result bug that originally masked this is now fixed, so
29
-  the remaining failure is the real one: `afs_array_size` receives bogus
30
-  dummy-array metadata and panics in the runtime.
31
-  The 29.11 claims audit surfaced this first through the original
32
-  `realworld_ipo_chain.f90` helper loop, and
33
-  `test_programs/realworld_assumed_shape_size.f90` now captures it as a living
34
-  XFAIL canary instead of letting the finding disappear.
3520
 - Revisit ambitious array/vectorization-style `integer(16)` rewrites only after the
3621
   scalar/runtime ABI surface is fully closed and audited.
test_programs/realworld_assumed_shape_size.f90modified
@@ -1,5 +1,4 @@
11
 ! Real-world-style assumed-shape SIZE query canary.
2
-! XFAIL: audit ASHAPE-SIZE-1 (assumed-shape dummy arrays still flow into afs_array_size without a descriptor)
32
 ! CHECK: 6
43
 ! REPRO_CHECK: asm
54
 ! REPRO_CHECK: obj
test_programs/realworld_suffix_scan.f90modified
@@ -1,11 +1,7 @@
11
 ! fpm-inspired source suffix classifier shape.
22
 ! Conservatively written because the typed constructor spelling
33
 ! `[character(len=20) :: ...]` is still a separate parser-gap note.
4
-! XFAIL: audit FPM-SUFFIX-1 (fpm-style suffix scan hits i32/i64 IR store mismatch)
5
-! CHECK: 3
6
-! CHECK: 2
7
-! CHECK: 2
8
-! CHECK: 322
4
+! CHECK: 3 2 2 322
95
 ! IR_CHECK: call @classify_sources(
106
 ! REPRO_CHECK: asm
117
 ! REPRO_CHECK: obj