Fix Cilk Plus tests for simulators.
2013-06-04 Balaji V. Iyer <balaji.v.iyer@intel.com> * c-c++-common/cilk-plus/AN/array_test1.c (main): Replaced argc, argv parameters with void. (main2): Removed argc parameter. * c-c++-common/cilk-plus/AN/array_test2.c (main2): Likewise. (main): Replaced argc, argv parameters with void. * c-c++-common/cilk-plus/AN/array_test_ND.c (main): Likewise. (main2): Removed argc parameter. * c-c++-common/cilk-plus/AN/builtin_fn_custom.c (main): Replaced argc argv parameters with void. Added __asm volatile to avoid optimization on argc, if necessary. * c-c++-common/cilk-plus/AN/builtin_fn_mutating (main): Likewise. * c-c++-common/cilk-plus/AN/builtin_func_double.c (main): Likewise. * c-c++-common/cilk-plus/AN/builtin_func_double2.c (main): Likewise. * c-c++-common/cilk-plus/AN/conditional.c (main): Likewise. * c-c++-common/cilk-plus/AN/exec-once.c (main): Likewise. * c-c++-common/cilk-plus/AN/exec-once2.c (main): Likewise. * c-c++-common/cilk-plus/AN/fn_ptr.c (main): Likewise. * c-c++-common/cilk-plus/AN/gather-scatter-errors.c (main): Likewise. * c-c++-common/cilk-plus/AN/gather_scatter.c (main): Likewise. * c-c++-common/cilk-plus/AN/misc.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise. * c-c++-common/cilk-plus/AN/parser_errors4.c (main): Likewise. * c-c++-common/cilk-plus/AN/rank_mismatch2.c (main): Likewise. * c-c++-common/cilk-plus/AN/sec_implicit_ex.c (main): Likewise. * c-c++-common/cilk-plus/AN/sec_reduce_return.c (main): Likewise. * c-c++-common/cilk-plus/AN/test_builtin_return.c (main): Likewise. * c-c++-common/cilk-plus/AN/vla.c (main): Likewise. * c-c++-common/cilk-plus/AN/comma-exp.c (main): Replaced argc, argv parameters with void. (main2): Removed argc parameter. * c-c++-common/cilk-plus/AN/if_test.c (main2): Likewise. (main): Replaced argc, argv parameters with void. * c-c++-common/cilk-plus/AN/fp_triplet_values (main2): Replace argc, argv parameters with void. Also renamed this function as main, and delete the existing main. * c-c++-common/cilk-plus/AN/sec_implicit.c (main2): Likewise. * c-c++-common/cilk-plus/AN/sec_implicit2.c (main2): Likewise. * c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c (main2): Likewise. From-SVN: r199661
This commit is contained in:
parent
b7342d25ed
commit
ce6a6ae175
@ -1,3 +1,46 @@
|
||||
2013-06-04 Balaji V. Iyer <balaji.v.iyer@intel.com>
|
||||
|
||||
* c-c++-common/cilk-plus/AN/array_test1.c (main): Replaced argc, argv
|
||||
parameters with void.
|
||||
(main2): Removed argc parameter.
|
||||
* c-c++-common/cilk-plus/AN/array_test2.c (main2): Likewise.
|
||||
(main): Replaced argc, argv parameters with void.
|
||||
* c-c++-common/cilk-plus/AN/array_test_ND.c (main): Likewise.
|
||||
(main2): Removed argc parameter.
|
||||
* c-c++-common/cilk-plus/AN/builtin_fn_custom.c (main): Replaced argc
|
||||
argv parameters with void. Added __asm volatile to avoid optimization
|
||||
on argc, if necessary.
|
||||
* c-c++-common/cilk-plus/AN/builtin_fn_mutating (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/builtin_func_double.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/builtin_func_double2.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/conditional.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/exec-once.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/exec-once2.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/fn_ptr.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/gather-scatter-errors.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/gather_scatter.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/parser_errors4.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/rank_mismatch2.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/sec_implicit_ex.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/sec_reduce_return.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/test_builtin_return.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/vla.c (main): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/comma-exp.c (main): Replaced argc, argv
|
||||
parameters with void.
|
||||
(main2): Removed argc parameter.
|
||||
* c-c++-common/cilk-plus/AN/if_test.c (main2): Likewise.
|
||||
(main): Replaced argc, argv parameters with void.
|
||||
* c-c++-common/cilk-plus/AN/fp_triplet_values (main2): Replace argc,
|
||||
argv parameters with void. Also renamed this function as main, and
|
||||
delete the existing main.
|
||||
* c-c++-common/cilk-plus/AN/sec_implicit.c (main2): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/sec_implicit2.c (main2): Likewise.
|
||||
* c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c (main2): Likewise.
|
||||
|
||||
2013-06-04 Ian Bolton <ian.bolton@arm.com>
|
||||
|
||||
* gcc.target/aarch64/movi_1.c: New test.
|
||||
|
@ -3,23 +3,17 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int main2 (int argc, char **argv);
|
||||
int main2 (char **argv);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char **)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
int x = 0;
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 ((char **)array);
|
||||
return x;
|
||||
}
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main2 (char **argv)
|
||||
{
|
||||
int array[10], ii = 0, x = 2, z= 0 , y = 0 ;
|
||||
for (ii = 0; ii < 10; ii++)
|
||||
|
@ -2,23 +2,17 @@
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
#include <stdlib.h>
|
||||
int main2(int argc, char **argv);
|
||||
int main(int argc, char **argv)
|
||||
int main2 (char **argv);
|
||||
int main(void)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char **)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
int x = 0;
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 ((char **)array);
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
int main2(int argc, char **argv)
|
||||
int main2(char **argv)
|
||||
{
|
||||
int array[10], array2[10], ii = 0, x = 2, z= 0 , y = 0 ;
|
||||
|
||||
|
@ -2,28 +2,21 @@
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
#include <stdlib.h>
|
||||
int main2(int argc, char **argv);
|
||||
int main(int argc, char **argv)
|
||||
int main2(char **argv);
|
||||
int main(void)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "10", "15"};
|
||||
x = main2 (3, (char **)array);
|
||||
}
|
||||
else if (argc == 3)
|
||||
x = main2 (argc, argv);
|
||||
else
|
||||
return 1;
|
||||
|
||||
int x = 0;
|
||||
const char *array[] = {"a.out", "10", "15"};
|
||||
x = main2 ((char **)array);
|
||||
return x;
|
||||
}
|
||||
|
||||
int main2(int argc, char **argv)
|
||||
int main2(char **argv)
|
||||
{
|
||||
int array[10][15], ii = 0, jj = 0,x = 0, z= 1 , y = 10 ;
|
||||
int array_2[10][15];
|
||||
|
||||
int argc = 3;
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
|
||||
for (ii = 0; ii < 10; ii++) {
|
||||
for (jj = 0; jj< 15; jj++) {
|
||||
|
@ -16,7 +16,7 @@ double my_func (double x, double y)
|
||||
|
||||
|
||||
/* char __sec_reduce_add (int *); */
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int ii,array[10], y = 0, y_int = 0, array2[10];
|
||||
double x, yy, array3[10], array4[10];
|
||||
|
@ -13,7 +13,7 @@ void my_func (double *x, double y)
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int ii,array[10], y = 0, y_int = 0, array2[10];
|
||||
double x = 0.000, yy, array3[10], array4[10];
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* #include <stdlib.h> */
|
||||
|
||||
/* char __sec_reduce_add (int *); */
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int ii,array[10], y = 0, y_int = 0, array2[10];
|
||||
double x, yy, array3[10], array4[10];
|
||||
|
@ -5,8 +5,9 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int argc = 1;
|
||||
int ii,array[10], y = 0, y_int = 0, array2[10], y_int2=0, y2=0;
|
||||
double x, yy, array3[10], array4[10];
|
||||
int all_zero, all_nonzero, any_zero, any_nonzero;
|
||||
@ -20,6 +21,7 @@ int main(int argc, char **argv)
|
||||
array3[ii] = (double) ii + 0.00;
|
||||
array4[ii] = (double) (1.00000/ (double)(ii+1));
|
||||
}
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
y_int = __sec_reduce_any_nonzero (array3[:] + array[4]);
|
||||
y_int2 = __sec_reduce_any_zero (array3[:] + array[4]);
|
||||
y = __sec_reduce_all_nonzero ((array3[:] + array4[:]) * (argc-1));
|
||||
|
@ -3,25 +3,20 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int main2 (int argc, char **argv);
|
||||
int main(int argc, char **argv)
|
||||
int main2 (char **argv);
|
||||
int main(void)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char **)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
int x = 0;
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 ((char **)array);
|
||||
return x;
|
||||
}
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main2 (char **argv)
|
||||
{
|
||||
int argc = 2;
|
||||
int array[10], array2[10], ii = 0, x = 2, z= 0 , y = 0 ;
|
||||
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
for (ii = 0; ii < 10; ii++)
|
||||
array[ii] = 10;
|
||||
|
||||
|
@ -2,10 +2,12 @@
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
#include <stdlib.h>
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int argc = 1;
|
||||
short array[1000], array2[1000], *array3, cond[1000], ii = 0;
|
||||
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
for (ii = 0; ii < 1000; ii++) {
|
||||
cond[ii] = 1;
|
||||
array[ii] = 1000;
|
||||
|
@ -17,7 +17,7 @@ int func (int *x)
|
||||
#endif
|
||||
return *x;
|
||||
}
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
char array[NUMBER], array2[NUMBER];
|
||||
int ii, d = 2;
|
||||
|
@ -35,11 +35,13 @@ int func4(int x)
|
||||
|
||||
|
||||
/* This program makes an assumption that argc == 1. */
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
|
||||
int argc = 1;
|
||||
int array[2500];
|
||||
|
||||
/* This is done to make sure the compiler does not optimize out argc. */
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
/* This should set array[0->999] to 5. */
|
||||
array[argc-1:func2(++argc):1] = 5;
|
||||
array[1000:500:1] = 10; /* set all variables in array[1000-->1499] to 10. */
|
||||
|
@ -2,12 +2,13 @@
|
||||
|
||||
typedef int (*foo)(int);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int array[10], array2[10][10];
|
||||
foo func_array[10];
|
||||
foo func_array2[10][10];
|
||||
foo ***func_array_ptr;
|
||||
int argc = 5;
|
||||
|
||||
array[:] = func_array[:](10); /* { dg-error "array notations cannot be used with function pointer arrays" } */
|
||||
func_array[0:5](10); /* { dg-error "array notations cannot be used with function pointer arrays" } */
|
||||
|
@ -3,27 +3,12 @@
|
||||
|
||||
float q;
|
||||
|
||||
int main2 (int argc, char **argv);
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char **)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
void func (int *x)
|
||||
{
|
||||
*x = 5;
|
||||
}
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10], array2[10];
|
||||
array2[:] = array[1.5:2]; /* { dg-error "start-index of array notation triplet is not an integer" } */
|
||||
|
@ -1,10 +1,10 @@
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
extern int func (int);
|
||||
int array[10][10], array2[10];
|
||||
|
||||
int argc = 1;
|
||||
array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */
|
||||
|
||||
array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int array[10][10], array2[10], array3[10], x = 0, y;
|
||||
int x_correct, y_correct, ii, jj = 0;
|
||||
|
@ -5,31 +5,25 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
int main2 (int argc, char **argv);
|
||||
int main2 (char **argv);
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "10", "15"};
|
||||
x = main2 (3, (char **) array);
|
||||
}
|
||||
else if (argc == 3)
|
||||
x = main2 (argc, argv);
|
||||
else
|
||||
return 1;
|
||||
|
||||
int x = 0;
|
||||
const char *array[] = {"a.out", "10", "15"};
|
||||
x = main2 ((char **) array);
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main2 (char **argv)
|
||||
{
|
||||
int x = 3, y, z, array[10], array2[10], TwodArray[10][10], jj,kk,ll ;
|
||||
int array2_check[10], array2d_check[10][10], array2d[10][10];
|
||||
int FourDArray[10][10][10][10], array4[10][10][10][10];
|
||||
int array4_check[10][10][10][10];
|
||||
int ii = 0;
|
||||
int ii = 0, argc = 3;
|
||||
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
|
||||
for (ii = 0; ii < 10; ii++)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10], array2[10][10];
|
||||
int x, ii, jj ;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10][10], array2[10];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10][10], array2[10];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10][10], array2[10];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10][10], array2[10];
|
||||
|
||||
|
@ -7,10 +7,10 @@ int function_call (int x)
|
||||
return x;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[100], array2[100][100];
|
||||
|
||||
int argc = 4;
|
||||
array[:] = array[:] + array2[:][:]; /* { dg-error "rank mismatch between" } */
|
||||
|
||||
if (array[:] + array2[:][:]) /* { dg-error "rank mismatch between" } */
|
||||
|
@ -1,22 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main2 (int argc, char **argv);
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char **)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10][10], array2[10];
|
||||
|
||||
|
@ -1,25 +1,11 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main2 (int argc, char **argv);
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char**)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int argc = 2;
|
||||
int array[10][10], array2[10];
|
||||
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
array[:][:] = __sec_implicit_index(argc) + array[:][:]; /* { dg-error "__sec_implicit_index parameter" } */
|
||||
return 0;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ void abort (void);
|
||||
void exit (int);
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int jj, kk, array_3C[10][10][10];
|
||||
int ii,array[10], y = 0, y_int = 0, array2[10], array_3[10][10][10];
|
||||
|
@ -1,22 +1,7 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fcilkplus" } */
|
||||
|
||||
int main2 (int argc, char **argv);
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
int x = 0;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char *array[] = {"a.out", "5"};
|
||||
x = main2 (2, (char **)array);
|
||||
}
|
||||
else
|
||||
x = main2 (argc, argv);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int main2 (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int array[10][10], array2[10];
|
||||
int x, y;
|
||||
|
@ -11,10 +11,12 @@ int mult_all (int *my_array, int size)
|
||||
return __sec_reduce_mul (my_array[0:size]);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
int main (void)
|
||||
{
|
||||
int argc = 1;
|
||||
int array[10000];
|
||||
|
||||
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
array[:] = argc; /* All elements should be one. */
|
||||
|
||||
if (add_all (array, 10000) != 10000)
|
||||
|
@ -28,11 +28,13 @@ int func4 (int *a1, int *a2)
|
||||
{
|
||||
return a1[NUMBER-1] * (__sec_reduce_add (a1[0:NUMBER] * a2[0:NUMBER]) + a2[0] + a2[1] + a2[3])/a1[NUMBER-2];
|
||||
}
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int array[NUMBER], array2[NUMBER];
|
||||
int return_value = 0;
|
||||
int ii = 0;
|
||||
int argc = 1;
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
for (ii = 0; ii < NUMBER; ii++)
|
||||
{
|
||||
array[ii] = argc; /* This should calculate to 1. */
|
||||
|
@ -5,8 +5,10 @@ int func (int x)
|
||||
{
|
||||
return x++;
|
||||
}
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
int argc = 1;
|
||||
__asm volatile ("" : "+r" (argc));
|
||||
int array[argc];
|
||||
|
||||
array[:] = 5; /* { dg-error "start-index and length fields necessary for using array notations in variable-length arrays." } */
|
||||
|
Loading…
Reference in New Issue
Block a user