Fix c-c++-common/goacc/routine-4.c and c-c++-common/goacc/routine-4-extern.c testcases

... in preparation for checks that we're introducing for OpenACC gang
reductions on orphan loops.

	gcc/testsuite/
	* c-c++-common/goacc/routine-4.c (seq, vector, worker, gang):
	Remove loop reductions.
	* c-c++-common/goacc/routine-4-extern.c (seq, vector, worker, gang):
	Likewise.

Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
This commit is contained in:
Kwok Cheung Yeung 2020-07-28 05:41:14 -07:00 committed by Thomas Schwinge
parent 92de188ea3
commit a83a075570
2 changed files with 64 additions and 80 deletions

View File

@ -26,23 +26,21 @@ void seq (void)
extern_vector (); /* { dg-error "routine call uses" } */
extern_seq ();
int red;
#pragma acc loop reduction (+:red) // { dg-warning "insufficient partitioning" }
#pragma acc loop // { dg-warning "insufficient partitioning" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop vector // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
}
void vector (void)
@ -52,23 +50,21 @@ void vector (void)
extern_vector ();
extern_seq ();
int red;
#pragma acc loop reduction (+:red)
#pragma acc loop
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red)
#pragma acc loop vector
for (int i = 0; i < 10; i++)
red ++;
;
}
void worker (void)
@ -78,23 +74,21 @@ void worker (void)
extern_vector ();
extern_seq ();
int red;
#pragma acc loop reduction (+:red)
#pragma acc loop
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red)
#pragma acc loop worker
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red)
#pragma acc loop vector
for (int i = 0; i < 10; i++)
red ++;
;
}
void gang (void)
@ -104,21 +98,19 @@ void gang (void)
extern_vector ();
extern_seq ();
int red;
#pragma acc loop reduction (+:red)
#pragma acc loop
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red)
#pragma acc loop gang
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red)
#pragma acc loop worker
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red)
#pragma acc loop vector
for (int i = 0; i < 10; i++)
red ++;
;
}

View File

@ -17,23 +17,21 @@ void seq (void)
vector (); /* { dg-error "routine call uses" } */
seq ();
int red;
#pragma acc loop reduction (+:red) // { dg-warning "insufficient partitioning" }
#pragma acc loop // { dg-warning "insufficient partitioning" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop vector // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
}
void vector (void) /* { dg-message "declared here" "1" } */
@ -43,23 +41,21 @@ void vector (void) /* { dg-message "declared here" "1" } */
vector ();
seq ();
int red;
#pragma acc loop reduction (+:red)
#pragma acc loop
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop worker // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red)
#pragma acc loop vector
for (int i = 0; i < 10; i++)
red ++;
;
}
void worker (void) /* { dg-message "declared here" "2" } */
@ -69,23 +65,21 @@ void worker (void) /* { dg-message "declared here" "2" } */
vector ();
seq ();
int red;
#pragma acc loop reduction (+:red)
#pragma acc loop
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red) // { dg-error "disallowed by containing routine" }
#pragma acc loop gang // { dg-error "disallowed by containing routine" }
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red)
#pragma acc loop worker
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red)
#pragma acc loop vector
for (int i = 0; i < 10; i++)
red ++;
;
}
void gang (void) /* { dg-message "declared here" "3" } */
@ -95,21 +89,19 @@ void gang (void) /* { dg-message "declared here" "3" } */
vector ();
seq ();
int red;
#pragma acc loop reduction (+:red)
#pragma acc loop
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop gang reduction (+:red)
#pragma acc loop gang
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop worker reduction (+:red)
#pragma acc loop worker
for (int i = 0; i < 10; i++)
red ++;
;
#pragma acc loop vector reduction (+:red)
#pragma acc loop vector
for (int i = 0; i < 10; i++)
red ++;
;
}