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:
Dale Johannesen 2005-06-05 01:22:31 +00:00 committed by Dale Johannesen
parent c943b01eaf
commit 1c3250edc2
4 changed files with 64 additions and 0 deletions

View File

@ -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

View 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;
}

View 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;
}

View 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" } } */