backport: [multiple changes]

2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/40021
	* gfortran.fortran-torture/execute/pr40021.f: New.

	2009-05-05  Richard Guenther  <rguenther@suse.de>

	PR middle-end/40023
	* gcc.c-torture/compile/pr40023.c: New testcase.

	2009-05-03  Richard Guenther  <rguenther@suse.de>

	PR c/39983
	* gcc.c-torture/compile/pr39983.c: New testcase.

From-SVN: r147195
This commit is contained in:
H.J. Lu 2009-05-06 17:45:40 +00:00 committed by H.J. Lu
parent 5576a9da4e
commit 9e249cbac5
4 changed files with 86 additions and 0 deletions

View File

@ -1,3 +1,21 @@
2009-05-06 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2009-05-06 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/40021
* gfortran.fortran-torture/execute/pr40021.f: New.
2009-05-05 Richard Guenther <rguenther@suse.de>
PR middle-end/40023
* gcc.c-torture/compile/pr40023.c: New testcase.
2009-05-03 Richard Guenther <rguenther@suse.de>
PR c/39983
* gcc.c-torture/compile/pr39983.c: New testcase.
2009-05-06 Janis Johnson <janis187@us.ibm.com>
* gcc.dg/dfp/pr39986.c: New test.

View File

@ -0,0 +1,17 @@
typedef struct {
int *p;
} *A;
extern const int a[1];
extern const int b[1];
void foo()
{
A x;
A y;
static const int * const c[] = { b };
x->p = (int*)c[0];
y->p = (int*)a;
}

View File

@ -0,0 +1,11 @@
typedef __builtin_va_list va_list;
typedef struct {
va_list ap;
} ScanfState;
void
GetInt(ScanfState *state, long llval)
{
*__builtin_va_arg(state->ap,long *) = llval;
__builtin_va_end(state->ap);
}

View File

@ -0,0 +1,40 @@
C Derived from lapack
PROGRAM test
DOUBLE PRECISION DA
INTEGER I, N
DOUBLE PRECISION DX(9),DY(9)
EXTERNAL DAXPY
N=5
DA=1.0
DATA DX/-2, -1, -3, -4, 1, 2, 10, 15, 14/
DATA DY/0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0/
CALL DAXPY (N,DA,DX,DY)
DO 10 I = 1, N
if (DX(I).ne.DY(I)) call abort
10 CONTINUE
STOP
END
SUBROUTINE DAXPY(N,DA,DX,DY)
DOUBLE PRECISION DA
INTEGER N
DOUBLE PRECISION DX(*),DY(*)
INTEGER I,IX,IY,M,MP1
INTRINSIC MOD
IF (N.LE.0) RETURN
20 M = MOD(N,4)
IF (M.EQ.0) GO TO 40
DO 30 I = 1,M
DY(I) = DY(I) + DA*DX(I)
30 CONTINUE
IF (N.LT.4) RETURN
40 MP1 = M + 1
DO 50 I = MP1,N,4
DY(I) = DY(I) + DA*DX(I)
DY(I+1) = DY(I+1) + DA*DX(I+1)
DY(I+2) = DY(I+2) + DA*DX(I+2)
DY(I+3) = DY(I+3) + DA*DX(I+3)
50 CONTINUE
RETURN
END