summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/vect/pr37143.C
blob: 70cdfd29b8bc78830919328e289ccf266cfe086a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */

void
f(int NumberOfSideSets, int *ssNumDFperSide, float *ssDF)
{
  int i;
  float *newssDF = __null;
  int *newssNumDF = new int [NumberOfSideSets];
  int ndf, nextDF, numNewDF = 0;
  int ii=0;
  for (i=0;  i<NumberOfSideSets;  i++)  
    numNewDF += newssNumDF[i];
  if (numNewDF > 0)
    newssDF = new float [numNewDF];
  nextDF = 0;
  ndf = ssNumDFperSide[ii];
  for (i=0;  i<ndf; i++)
    newssDF[nextDF++] = ssDF[i];
}

/* { dg-final { cleanup-tree-dump "vect" } } */