Skip to content
Snippets Groups Projects
Unverified Commit 31283965 authored by Xi Ruoyao's avatar Xi Ruoyao
Browse files

testsuite: Unbreak pr110557.cc where long is 32-bit


On ports with 32-bit long, the test produced excess errors:

    gcc/testsuite/g++.dg/vect/pr110557.cc:12:8: warning: width of
    'Item::y' exceeds its type

Reported-by: default avatarPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>

gcc/testsuite/ChangeLog:

	* g++.dg/vect/pr110557.cc: Use long long instead of long for
	64-bit type.
	(test): Remove an unnecessary cast.
parent 104b0900
No related branches found
No related tags found
No related merge requests found
// { dg-additional-options "-mavx" { target { avx_runtime } } }
static inline long
min (long a, long b)
typedef long long i64;
static inline i64
min (i64 a, i64 b)
{
return a < b ? a : b;
}
......@@ -9,16 +11,16 @@ min (long a, long b)
struct Item
{
int x : 8;
long y : 55;
i64 y : 55;
bool z : 1;
};
__attribute__ ((noipa)) long
__attribute__ ((noipa)) i64
test (Item *a, int cnt)
{
long size = 0;
i64 size = 0;
for (int i = 0; i < cnt; i++)
size = min ((long)a[i].y, size);
size = min (a[i].y, size);
return size;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment