[Bug target/81663] New: nvptx and fstack-check
vries at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 2 09:01:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81663
Bug ID: 81663
Summary: nvptx and fstack-check
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
For nvptx, we run into this failure (specifically, a failure to produce a
warning):
...
Executing on host: nvptx-none-gcc
src/gcc-mainline/gcc/testsuite/gcc.dg/pr70017.c -fno-diagnostics-show-caret
-fdiagnostics-color=never -fstack-check=generic -S -o pr70017.s
(timeout = 300)
FAIL: gcc.dg/pr70017.c (test for warnings, line 21)
PASS: gcc.dg/pr70017.c (test for excess errors)
...
The test-case looks like this:
...
/* { dg-do compile } */
/* { dg-require-stack-check "generic" } */
/* { dg-options "-fstack-check=generic" } */
/* Check that the expected warning is issued for large frames. */
#define ONE(s) char a##s[32];
#define TEN(s) ONE(s##0) ONE(s##1) ONE(s##2) ONE(s##3) ONE(s##4) \
ONE(s##5) ONE(s##6) ONE(s##7) ONE(s##8) ONE(s##9)
#define HUNDRED(s) TEN(s##0) TEN(s##1) TEN(s##2) TEN(s##3) TEN(s##4) \
TEN(s##5) TEN(s##6) TEN(s##7) TEN(s##8) TEN(s##9)
void foo(void)
{
HUNDRED(a)
HUNDRED(b)
#undef ONE
#define ONE(s) a##s[0] = 0;
HUNDRED(a)
HUNDRED(b)
} /* { dg-warning "frame size too large for reliable stack checking" "" {
target { ! alpha*-*-* } } } */
...
The ptx specification abstracts away from the stack, so I'm not sure
fstack-check makes sense for the target (although it might for msoft-stack).
It's probably a good idea to error out in the target, which should make all
dg-require-stack-check fail.
More information about the Gcc-bugs
mailing list