[Bug c/90721] New: [Bug] ./gcc.dg/torture/stackalign/builtin-apply-4.c test case getting fail
akhilesh.k at samsung dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 3 11:01:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90721
Bug ID: 90721
Summary: [Bug] ./gcc.dg/torture/stackalign/builtin-apply-4.c
test case getting fail
Product: gcc
Version: 8.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: akhilesh.k at samsung dot com
Target Milestone: ---
Hello
I am working On ARM target: in that
./gcc.dg/torture/stackalign/builtin-apply-4.c test case getting fail when we
use -flto flag with gcc 8.3 but same test cases getting pass when we run on gcc
6.3
=================================================
bash-3.2# cat ./gcc.dg/torture/stackalign/builtin-apply-4.c
/* PR tree-optimization/20076 */
/* { dg-do run } */
/* { dg-additional-options "-fgnu89-inline" } */
/* { dg-require-effective-target untyped_assembly } */
#include <stdio.h>
extern void abort (void);
double
foo (int arg)
{
if (arg != 116)
abort();
return arg + 1;
}
inline double
bar (int arg)
{
foo (arg);
__builtin_return (__builtin_apply ((void (*) ()) foo,
__builtin_apply_args (), 16));
}
int
main (int argc, char **argv)
{
if (bar (116) != 117.0)
printf("hello\n");
return 0;
}
bash-3.2#
=================================================
gcc 8.x Results
bash-3.2# gcc ./gcc.dg/torture/stackalign/builtin-apply-4.c -flto
-fgnu89-inline -lm -o ./builtin-apply-4.exe
bash-3.2# ./builtin-apply-4.exe
hello
bash-3.2#
gcc 6.3 test results
bash-3.2# /bin/gcc ./gcc.dg/torture/stackalign/builtin-apply-4.c -flto
-fgnu89-inline -lm -o ./builtin-apply-4.exe
bash-3.2# ./builtin-apply-4.exe
bash-3.2#
it seems that __builtin_apply returning wrong value
More information about the Gcc-bugs
mailing list