URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 308 |
Rev 384 |
/* { dg-do run } */
|
/* { dg-do run } */
|
|
|
extern "C" {
|
extern "C" {
|
extern void abort (void);
|
extern void abort (void);
|
extern int strcmp (const char *, const char *);
|
extern int strcmp (const char *, const char *);
|
}
|
}
|
|
|
template
|
template
|
struct Vec {
|
struct Vec {
|
T x, y;
|
T x, y;
|
long z;
|
long z;
|
long long zz;
|
long long zz;
|
};
|
};
|
|
|
typedef struct {
|
typedef struct {
|
float fscalar;
|
float fscalar;
|
double dv[10];
|
double dv[10];
|
int iscalar;
|
int iscalar;
|
long z;
|
long z;
|
long long zz;
|
long long zz;
|
Vec cv;
|
Vec cv;
|
} anonymous;
|
} anonymous;
|
|
|
//Vec dd;
|
//Vec dd;
|
const char *enc = @encode(Vec);
|
const char *enc = @encode(Vec);
|
const char *enc2 = @encode(Vec);
|
const char *enc2 = @encode(Vec);
|
const char *enc3 = @encode(anonymous);
|
const char *enc3 = @encode(anonymous);
|
|
|
#ifdef __LP64__
|
#ifdef __LP64__
|
#define L "q"
|
#define L "q"
|
#else
|
#else
|
#define L "l"
|
#define L "l"
|
#endif
|
#endif
|
|
|
int main(void) {
|
int main(void) {
|
const char *encode = @encode(long);
|
const char *encode = @encode(long);
|
|
|
if (strcmp (encode, L))
|
if (strcmp (encode, L))
|
abort();
|
abort();
|
|
|
if (strcmp (enc, "{Vec=ff" L "q}"))
|
if (strcmp (enc, "{Vec=ff" L "q}"))
|
abort();
|
abort();
|
|
|
if (strcmp (enc2, "{Vec=dd" L "q}"))
|
if (strcmp (enc2, "{Vec=dd" L "q}"))
|
abort();
|
abort();
|
|
|
if (strcmp (enc3, "{?=f[10d]i" L "q{Vec=rcrc" L "q}}"))
|
if (strcmp (enc3, "{?=f[10d]i" L "q{Vec=rcrc" L "q}}"))
|
abort();
|
abort();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.