Strengthen a test that had been evading warnings on 64-bit only.
This test change is expected to break the 64-bit build (to match currently-broken 32-bit). A subsequet test change is expected to fix both builds.
This change makes a test, which was incorrectly architecture-specific, into one that is architecture-independent.
Test is: array-collections/c_dependent.
The relevant array-size warning occurs in gcc-11+ (new-gcc).
The test had been passing on 64-bit only because of a quirk: new-gcc's dependent warning gives false accept when a dimension expression is complex enough; CFA's (arch-specific) inserted casts interacted with an incidental choice of the test program, as follows:
// original void f__bound_ptr_allow( int n, float a[n] ); // source void f__bound_ptr_allow( int n, float a[(unsigned long int) n] ); // 64-bit lowering => different enough type, check skipped void f__bound_ptr_allow( int n, float a[(unsigned int) n] ); // 32-bit lowering => close enough type, check enforced
// this change's revision void f__bound_ptr_allow( size_t n, float a[n] ); // source void f__bound_ptr_allow( unsigned long int n, float a[(unsigned long int) n] ); // 64-bit lowering => close enough type, check enforced void f__bound_ptr_allow( unsigned int n, float a[(unsigned int) n] ); // 32-bit lowering => close enough type, check enforced
Slightly loosen a test that has failed on 32-bit build lately.
Since 16d9c3a, this test was failing on all builds. The present change in not 32-bit specific; it's expected to fix this particular test, on all builds.
Note there are further 32-bit issues remaining, even after this fix.
Test is: array-collections/c-dependent
Loosening is: Adjust test's scope to avoid exercising "truly incorrect" C code; which may receive compile-time array-bound warnings on sufficiently advanced C compilers. In test code and .expect, switch from passing incorrect bounds to passing correct bounds; the point of the test (newly clarified, always foremost) is that CFA handles C's dependently sized VLA parameter.