testsuite: Fix gcc.dg/analyzer/allocation-size-multiline-3.c
authorHans-Peter Nilsson <hp@axis.com>
Fri, 24 Feb 2023 19:12:46 +0000 (20:12 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Tue, 7 Mar 2023 00:14:30 +0000 (01:14 +0100)
For 32-bit newlib targets (such as cris-elf and pru-elf),
that int32_t is "long int".  See other regexps in the
testsuite matching "aka (long )?int" (with single-quotes
where needed) where the pattern in
allocation-size-multiline-3.c matches plain "int".  Uses the
special syntax recently introduced for multi-line patterns.

testsuite:
* gcc.dg/analyzer/allocation-size-multiline-3.c: Handle
int32_t being "long int".

gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c

index e27364a..b3de582 100644 (file)
@@ -21,7 +21,7 @@ void test_constant_99 (void)
     |                  ^~~~~~
     |                  |
     |                  (1) allocated 99 bytes here
-    |                  (2) assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (2) assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */
 
@@ -39,6 +39,6 @@ void test_symbolic (int n)
     |                  ^~~~~~
     |                  |
     |                  (1) allocated 'n * 2' bytes here
-    |                  (2) assigned to 'int32_t *' {aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (2) assigned to 'int32_t *' {aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */