TESTSUITE: Fix Wconversion-null*.C tests for aarch64 -mabi=ilp32
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Wed, 20 May 2020 21:15:18 +0000 (22:15 +0100)
committerJozef Lawrynowicz <jozef.l@mittosystems.com>
Wed, 20 May 2020 21:29:01 +0000 (22:29 +0100)
commitedd482f310f4ec46310e7c2c82c88dad64b5a4ff
tree5cbe90b7321e605caa888b67e9168e370c90bcaa
parent4b38d56dbac6742b038551a36ec80200313123a1
TESTSUITE: Fix Wconversion-null*.C tests for aarch64 -mabi=ilp32

This fixes regressions for aarch64 with -mabi=ilp32 of the
Wconversion-null*.C tests, introduced by 92ea8e1bccc.

The "g (int)" declaration is required for that target where
sizeof(int) == sizeof(long) == sizeof(void *).

To handle the msp430/-mlarge case, an explicit declaration of
"g (__int20)" is required.

gcc/testsuite/ChangeLog:

* g++.dg/warn/Wconversion-null-2.C: Add explicit declarations for l()
and g() with int, long, long long and __int20 arguments.
* g++.dg/warn/Wconversion-null.C: Likewise.
gcc/testsuite/g++.dg/warn/Wconversion-null-2.C
gcc/testsuite/g++.dg/warn/Wconversion-null.C