Add testcases for PRs middle-end/41562 and middle-end/46185.
2010-12-06 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/41562 * g++.dg/graphite/pr41562.C: New. PR middle-end/46185 * gcc.dg/graphite/pr46185.c: New. From-SVN: r167527
This commit is contained in:
parent
dda8b452d3
commit
1b6d012b50
3 changed files with 72 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-12-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR middle-end/41562
|
||||
* g++.dg/graphite/pr41562.C: New.
|
||||
|
||||
PR middle-end/46185
|
||||
* gcc.dg/graphite/pr46185.c: New.
|
||||
|
||||
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc.dg/foreach-8.m: New.
|
||||
|
|
18
gcc/testsuite/g++.dg/graphite/pr41562.C
Normal file
18
gcc/testsuite/g++.dg/graphite/pr41562.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ftree-loop-distribution -floop-block" } */
|
||||
|
||||
typedef struct stSirenEncoder { } *SirenEncoder;
|
||||
|
||||
int Siren7_EncodeFrame(SirenEncoder encoder, unsigned char *DataIn, unsigned char *DataOut) {
|
||||
int number_of_regions;
|
||||
static int absolute_region_power_index[28] = {0};
|
||||
static int region_mlt_bit_counts[28] = {0};
|
||||
int dwRes = 0;
|
||||
int region;
|
||||
if (dwRes != 0) return dwRes;
|
||||
for(region = 0; region < number_of_regions; region++)
|
||||
{
|
||||
absolute_region_power_index[region] += 24;
|
||||
region_mlt_bit_counts[region] = 0;
|
||||
}
|
||||
}
|
46
gcc/testsuite/gcc.dg/graphite/pr46185.c
Normal file
46
gcc/testsuite/gcc.dg/graphite/pr46185.c
Normal file
|
@ -0,0 +1,46 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -floop-interchange -ffast-math -fno-ipa-cp" } */
|
||||
|
||||
#define DEBUG 0
|
||||
#if DEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
double u[1782225];
|
||||
|
||||
static int __attribute__((noinline))
|
||||
foo (int N, int *res)
|
||||
{
|
||||
int i, j;
|
||||
double sum = 0;
|
||||
for (i = 0; i < N; i++)
|
||||
for (j = 0; j < N; j++)
|
||||
sum = sum + u[i + 1335 * j];
|
||||
|
||||
for (i = 0; i < N; i++)
|
||||
u[1336 * i] *= 2;
|
||||
|
||||
*res = sum + N + u[1336 * 2] + u[1336];
|
||||
}
|
||||
|
||||
extern void abort ();
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int i, j, res;
|
||||
|
||||
for (i = 0; i < 1782225; i++)
|
||||
u[i] = 2;
|
||||
|
||||
foo (1335, &res);
|
||||
|
||||
#if DEBUG
|
||||
fprintf (stderr, "res = %d \n", res);
|
||||
#endif
|
||||
|
||||
if (res != 3565793)
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue