public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/63607] New: run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc
@ 2014-10-21 7:58 fei.yang0953 at gmail dot com
2014-10-21 8:33 ` [Bug lto/63607] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: fei.yang0953 at gmail dot com @ 2014-10-21 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63607
Bug ID: 63607
Summary: run fail with -flto -mfloat-abi=softfp for
armeb-linux-gnueabi-gcc
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: fei.yang0953 at gmail dot com
testsuite/gcc.dg/torture/stackalign/builtin-apply-4.c:
/* PR tree-optimization/20076 */
/* { dg-do run } */
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)
abort ();
return 0;
}
Compile option: armeb-linux-gnueabi-gcc builtin-apply-4.c -static
-mfloat-abi=softfp -flto
Disassembly:
0000076c <main>:
76c: e92d4800 push {fp, lr}
770: e28db004 add fp, sp, #4
774: e3a02113 mov r2, #-1073741820 ; 0xc0000004
778: e30a3aaa movw r3, #43690 ; 0xaaaa
77c: e34a3aaa movt r3, #43690 ; 0xaaaa
780: e5823000 str r3, [r2]
784: e3a00074 mov r0, #116 ; 0x74
788: ebffffaa bl 638 <bar.4066>
78c: eeb06b40 vmov.f64 d6, d0
790: ed9f7b0a vldr d7, [pc, #40] ; 7c0 <main+0x54>
794: eeb46b47 vcmp.f64 d6, d7
Analysis: Return value is not passed correctly. As we can see from line 790,
main gets the return value from d0 register, which is wrong as we use
-mfloat-abi=softfp here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/63607] run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc
2014-10-21 7:58 [Bug lto/63607] New: run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc fei.yang0953 at gmail dot com
@ 2014-10-21 8:33 ` rguenth at gcc dot gnu.org
2014-10-23 12:31 ` fei.yang0953 at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-21 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63607
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Is -mfloat-abi=softfp properly used at LTO stage?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/63607] run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc
2014-10-21 7:58 [Bug lto/63607] New: run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc fei.yang0953 at gmail dot com
2014-10-21 8:33 ` [Bug lto/63607] " rguenth at gcc dot gnu.org
@ 2014-10-23 12:31 ` fei.yang0953 at gmail dot com
2015-01-16 15:50 ` ramana at gcc dot gnu.org
2015-02-12 13:35 ` ramana at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: fei.yang0953 at gmail dot com @ 2014-10-23 12:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63607
--- Comment #2 from Fei Yang <fei.yang0953 at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> Is -mfloat-abi=softfp properly used at LTO stage?
It seems that -mfloat-abi=softfp is here for lto1:
/home/lxr/install/bin/../lib/gcc/../../libexec/gcc/armeb-linux-gnueabi/4.7.1/lto1
-quiet -dumpdir ./ -dumpbase 1.wpa -mfloat-abi=softfp -march=armv7-a
-mtls-dialect=gnu -mfloat-abi=softfp -march=armv7-a -mtls-dialect=gnu -auxbase
cc9cih7t -O2 -version -fltrans-output-list=/tmp/ccZqlDqA.ltrans.out -fwpa
-fresolution=/tmp/ccUnDlh3.res @/tmp/ccSi9hcz
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/63607] run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc
2014-10-21 7:58 [Bug lto/63607] New: run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc fei.yang0953 at gmail dot com
2014-10-21 8:33 ` [Bug lto/63607] " rguenth at gcc dot gnu.org
2014-10-23 12:31 ` fei.yang0953 at gmail dot com
@ 2015-01-16 15:50 ` ramana at gcc dot gnu.org
2015-02-12 13:35 ` ramana at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-01-16 15:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63607
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
--- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Fei Yang from comment #2)
> (In reply to Richard Biener from comment #1)
> > Is -mfloat-abi=softfp properly used at LTO stage?
>
> It seems that -mfloat-abi=softfp is here for lto1:
>
> /home/lxr/install/bin/../lib/gcc/../../libexec/gcc/armeb-linux-gnueabi/4.7.
> 1/lto1 -quiet -dumpdir ./ -dumpbase 1.wpa -mfloat-abi=softfp -march=armv7-a
> -mtls-dialect=gnu -mfloat-abi=softfp -march=armv7-a -mtls-dialect=gnu
> -auxbase cc9cih7t -O2 -version -fltrans-output-list=/tmp/ccZqlDqA.ltrans.out
> -fwpa -fresolution=/tmp/ccUnDlh3.res @/tmp/ccSi9hcz
Can you check if it occurs with 4.8 , 4.9 or trunk today ? I don't really have
a big endian environment setup to reproduce this easily enough.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/63607] run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc
2014-10-21 7:58 [Bug lto/63607] New: run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc fei.yang0953 at gmail dot com
` (2 preceding siblings ...)
2015-01-16 15:50 ` ramana at gcc dot gnu.org
@ 2015-02-12 13:35 ` ramana at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-02-12 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63607
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-02-12
Ever confirmed|0 |1
--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Even if confirmed this is BE related and so pushing this down to P4.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-12 13:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 7:58 [Bug lto/63607] New: run fail with -flto -mfloat-abi=softfp for armeb-linux-gnueabi-gcc fei.yang0953 at gmail dot com
2014-10-21 8:33 ` [Bug lto/63607] " rguenth at gcc dot gnu.org
2014-10-23 12:31 ` fei.yang0953 at gmail dot com
2015-01-16 15:50 ` ramana at gcc dot gnu.org
2015-02-12 13:35 ` ramana at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).