20050603-1.c: New.
2005-06-04 Dale Johannesen <dalej@apple.com> * gcc.c-torture/execute/20050603-1.c: New. * gcc.c-torture/execute/20050603-2.c: New. * gcc.dg/20050603-3.c: New. From-SVN: r100611
This commit is contained in:
parent
c943b01eaf
commit
1c3250edc2
@ -1,3 +1,9 @@
|
||||
2005-06-04 Dale Johannesen <dalej@apple.com>
|
||||
|
||||
* gcc.c-torture/execute/20050603-1.c: New.
|
||||
* gcc.c-torture/execute/20050603-2.c: New.
|
||||
* gcc.dg/20050603-3.c: New.
|
||||
|
||||
2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
PR fortran/19195
|
||||
|
23
gcc/testsuite/gcc.c-torture/execute/20050603-1.c
Normal file
23
gcc/testsuite/gcc.c-torture/execute/20050603-1.c
Normal file
@ -0,0 +1,23 @@
|
||||
/* { dg-do run { target powerpc*-*-* } } */
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
register int *testreg asm ("r29");
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int *ext_func (int *p) { return p; }
|
||||
|
||||
void test_reg_save_restore (int*) __attribute__((noinline));
|
||||
void
|
||||
test_reg_save_restore (int *p)
|
||||
{
|
||||
setlocale (LC_ALL, "C");
|
||||
testreg = ext_func(p);
|
||||
}
|
||||
main() {
|
||||
testreg = &x;
|
||||
test_reg_save_restore (&y);
|
||||
if (testreg != &y)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
20
gcc/testsuite/gcc.c-torture/execute/20050603-2.c
Normal file
20
gcc/testsuite/gcc.c-torture/execute/20050603-2.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* { dg-do run } */
|
||||
#include <stdlib.h>
|
||||
struct s {
|
||||
unsigned short f: 16;
|
||||
unsigned short y: 8;
|
||||
unsigned short g: 2;
|
||||
unsigned int x;
|
||||
};
|
||||
|
||||
void set (struct s*, int) __attribute__((noinline));
|
||||
void set (struct s* p, int flags) {
|
||||
p->g = flags << 1;
|
||||
}
|
||||
main() {
|
||||
struct s foo = {0 , 0, 3, 0};
|
||||
set (&foo, -1);
|
||||
if (foo.g != 2)
|
||||
abort();
|
||||
return 0;
|
||||
}
|
15
gcc/testsuite/gcc.dg/20050603-3.c
Normal file
15
gcc/testsuite/gcc.dg/20050603-3.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile { target "powerpc-*-*" } } */
|
||||
/* { dg-options "-O2" } */
|
||||
struct Q
|
||||
{
|
||||
long x:20;
|
||||
long y:4;
|
||||
long z:8;
|
||||
}b;
|
||||
/* This should generate a single rl[w]imi. */
|
||||
void rotins (unsigned int x)
|
||||
{
|
||||
b.y = (x<<12) | (x>>20);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "inm" } } */
|
Loading…
Reference in New Issue
Block a user