For 32-bit newlib targets (e.g. arm-eabi)  int32_t is "long int".

Like previous patches in these tests, update the matching regexps to
match "aka (long )?int".

Tested on arm-eabi and aarch64-linux-gnu.

2023-08-08  Christophe Lyon  <christophe.l...@linaro.org>

        gcc/testsuite/
        PR analyzer/110426
        * gcc.dg/analyzer/allocation-size-multiline-1.c: Handle
        int32_t being "long int".
        * gcc.dg/analyzer/allocation-size-multiline-2.c: Likewise.
        * gcc.dg/analyzer/allocation-size-multiline-3.c: Likewise.
---
 gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c | 6 +++---
 gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c | 6 +++---
 gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c 
b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c
index 9938ba237a0..b56e4b4e8e1 100644
--- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-1.c
@@ -16,7 +16,7 @@ void test_constant_1 (void)
     |   int32_t *ptr = __builtin_malloc (1);
     |                  ^~~~~~~~~~~~~~~~~~~~
     |                  |
-    |                  (1) allocated 1 bytes and assigned to 'int32_t *' {aka 
'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 1 bytes and assigned to 'int32_t *' {aka 
'{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */
 
@@ -34,7 +34,7 @@ void test_constant_2 (void)
     |   int32_t *ptr = __builtin_malloc (2);
     |                  ^~~~~~~~~~~~~~~~~~~~
     |                  |
-    |                  (1) allocated 2 bytes and assigned to 'int32_t *' {aka 
'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 2 bytes and assigned to 'int32_t *' {aka 
'{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */
 
@@ -52,6 +52,6 @@ void test_symbolic (int n)
     |   int32_t *ptr = __builtin_malloc (n * 2);
     |                  ^~~~~~~~~~~~~~~~~~~~~~~~
     |                  |
-    |                  (1) allocated 'n * 2' bytes and assigned to 'int32_t *' 
{aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 'n * 2' bytes and assigned to 'int32_t *' 
{aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is 
'4'
     |
    { dg-end-multiline-output "" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c 
b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c
index 9e1269cbb7a..8912913a78c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-2.c
@@ -16,7 +16,7 @@ void test_constant_1 (void)
     |   int32_t *ptr = __builtin_alloca (1);
     |                  ^~~~~~~~~~~~~~~~~~~~
     |                  |
-    |                  (1) allocated 1 bytes and assigned to 'int32_t *' {aka 
'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 1 bytes and assigned to 'int32_t *' {aka 
'{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */
 
@@ -33,7 +33,7 @@ void test_constant_2 (void)
     |   int32_t *ptr = __builtin_alloca (2);
     |                  ^~~~~~~~~~~~~~~~~~~~
     |                  |
-    |                  (1) allocated 2 bytes and assigned to 'int32_t *' {aka 
'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 2 bytes and assigned to 'int32_t *' {aka 
'{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */
 
@@ -50,7 +50,7 @@ void test_symbolic (int n)
     |   int32_t *ptr = __builtin_alloca (n * 2);
     |                  ^~~~~~~~~~~~~~~~~~~~~~~~
     |                  |
-    |                  (1) allocated 'n * 2' bytes and assigned to 'int32_t *' 
{aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 'n * 2' bytes and assigned to 'int32_t *' 
{aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is 
'4'
     |
    { dg-end-multiline-output "" } */
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c 
b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c
index 71790d91753..88fc8edee7f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c
@@ -20,7 +20,7 @@ void test_constant_99 (void)
     |   int32_t *ptr = alloca (99);
     |                  ^~~~~~
     |                  |
-    |                  (1) allocated 99 bytes and assigned to 'int32_t *' {aka 
'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 99 bytes and assigned to 'int32_t *' {aka 
'{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is '4'
     |
    { dg-end-multiline-output "" } */
 
@@ -37,6 +37,6 @@ void test_symbolic (int n)
     |   int32_t *ptr = alloca (n * 2);
     |                  ^~~~~~
     |                  |
-    |                  (1) allocated 'n * 2' bytes and assigned to 'int32_t *' 
{aka 'int *'} here; 'sizeof (int32_t {aka int})' is '4'
+    |                  (1) allocated 'n * 2' bytes and assigned to 'int32_t *' 
{aka '{re:long :re?}int *'} here; 'sizeof (int32_t {aka {re:long :re?}int})' is 
'4'
     |
    { dg-end-multiline-output "" } */
-- 
2.34.1

Reply via email to