summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-02-26 16:58:10 +0100
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-04-28 23:35:45 +0200
commitcf1bf9225a5c635802a8e016cbdf9d39183e88c3 (patch)
treee3f848ab3e6a3671d0b5e4b8f21922c4978394db /gcc/testsuite/gcc.dg
parentfbd959aae69a98c07848905136e168430889f022 (diff)
removes global variables
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c
index c5f6e1a963b..5cc493d2f3f 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-42-mem-ref-0.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do link } */
/* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate -fdump-ipa-structure-reorg -fipa-typelist-field=nextout -fipa-typelist-struct=arc" } */
#include <stdlib.h>
@@ -22,8 +22,8 @@ main ()
{
int num_threads = 10;
arc_p *deleted_arcs;
- register arc_t *arcnew;
- deleted_arcs = (arc_p *) malloc (num_threads * sizeof (arc_p));
- deleted_arcs[num_threads][num_threads] = arcnew[0];
+ register arc_t *arcnew = (arc_t*) malloc (num_threads * sizeof (arc_p));
+ deleted_arcs = (arc_p *) malloc (num_threads * num_threads * sizeof (arc_p));
+ deleted_arcs[num_threads - 1][num_threads - 1] = arcnew[0];
return 0;
}