public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ramana at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/43572] [4.5/4.6 Regression] FAIL: gfortran.dg/PR19872.f execution test; formatted read - wrong numbers
Date: Thu, 15 Apr 2010 18:40:00 -0000 [thread overview]
Message-ID: <20100415183931.31231.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43572-276@http.gcc.gnu.org/bugzilla/>
------- Comment #17 from ramana at gcc dot gnu dot org 2010-04-15 18:39 -------
Created an attachment (id=20389)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20389&action=view)
Testcase for the problem.
Can this bug be reprioritized ?
Deep inside _gfortrani_set_integer, there's an incorrect sibling call to memcpy
where it shouldn't be doing so.
64: e28d1010 add r1, sp, #16
68: e3a02004 mov r2, #4
6c: e521c008 str ip, [r1, #-8]!
70: e28dd014 add sp, sp, #20
74: e49de004 pop {lr} ; (ldr lr, [sp], #4)
78: eafffffe b 0 <memcpy>
78: R_ARM_PLT32 memcpy
There's no reason why this should be being marked as a valid tail call here.
>From the tailcall dumps.
set_integer (void * dest, GFC_INTEGER_8 value, int length)
{
GFC_INTEGER_1 tmp;
GFC_INTEGER_2 tmp;
GFC_INTEGER_4 tmp;
GFC_INTEGER_8 tmp;
GFC_INTEGER_1 tmp.30;
GFC_INTEGER_2 tmp.29;
GFC_INTEGER_4 tmp.28;
size_t length.27;
<bb 2>:
switch (length_1(D)) <default: <L4>, case 1: <L3>, case 2: <L2>, case 4:
<L1>, case 8: <L0>>
<L0>:
tmp = value_2(D);
memcpy (dest_4(D), &tmp, 8); [tail call]
goto <bb 8>;
<L1>:
tmp.28_5 = (GFC_INTEGER_4) value_2(D);
tmp = tmp.28_5;
memcpy (dest_4(D), &tmp, 4); [tail call]
goto <bb 8>;
<L2>:
tmp.29_7 = (GFC_INTEGER_2) value_2(D);
tmp = tmp.29_7;
memcpy (dest_4(D), &tmp, 2); [tail call]
goto <bb 8>;
<L3>:
tmp.30_9 = (GFC_INTEGER_1) value_2(D);
tmp = tmp.30_9;
memcpy (dest_4(D), &tmp, 1); [tail call]
goto <bb 8>;
<L4>:
internal_error (0B, &"Bad integer kind"[0]);
<bb 8>:
return;
}
Attached is a testcase for this . Reproducible by building a cross-compiler to
arm-eabi .
../trunk/configure --with-cpu=cortex-a8 --target=arm-none-eabi
--enable-languages=c
And command line options for the testcase are just -O2.
You can reproduce this problem with r149170 and the fix up patch applied as
well.
cheers
Ramana
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43572
next prev parent reply other threads:[~2010-04-15 18:40 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-43572-276@http.gcc.gnu.org/bugzilla/>
2010-03-31 18:08 ` [Bug libfortran/43572] " danglin at gcc dot gnu dot org
2010-04-01 9:41 ` [Bug libfortran/43572] [4.5 Regression] " burnus at gcc dot gnu dot org
2010-04-01 11:26 ` howarth at nitro dot med dot uc dot edu
2010-04-01 11:26 ` howarth at nitro dot med dot uc dot edu
2010-04-01 20:51 ` dave at hiauly1 dot hia dot nrc dot ca
2010-04-01 21:03 ` danglin at gcc dot gnu dot org
2010-04-02 2:58 ` jvdelisle at gcc dot gnu dot org
2010-04-03 17:16 ` rguenth at gcc dot gnu dot org
2010-04-06 11:38 ` rguenth at gcc dot gnu dot org
2010-04-09 20:06 ` [Bug libfortran/43572] [4.5/4.6 " dave at hiauly1 dot hia dot nrc dot ca
2010-04-10 8:45 ` ramana at gcc dot gnu dot org
2010-04-12 15:50 ` ramana at gcc dot gnu dot org
2010-04-12 16:00 ` rguenth at gcc dot gnu dot org
2010-04-12 16:03 ` dave at hiauly1 dot hia dot nrc dot ca
2010-04-12 17:22 ` ramana at gcc dot gnu dot org
2010-04-15 13:44 ` dave at hiauly1 dot hia dot nrc dot ca
2010-04-15 18:40 ` ramana at gcc dot gnu dot org [this message]
2010-04-16 7:47 ` [Bug tree-optimization/43572] " ramana at gcc dot gnu dot org
2010-04-16 8:59 ` rguenth at gcc dot gnu dot org
2010-04-16 10:00 ` rguenth at gcc dot gnu dot org
2010-04-16 10:54 ` rguenth at gcc dot gnu dot org
2010-04-16 13:22 ` rguenth at gcc dot gnu dot org
2010-04-16 15:00 ` [Bug tree-optimization/43572] [4.5 " rguenth at gcc dot gnu dot org
2010-04-19 9:06 ` ramana at gcc dot gnu dot org
2010-04-19 9:13 ` rguenth at gcc dot gnu dot org
2010-04-19 9:14 ` rguenth at gcc dot gnu dot org
2010-04-20 23:34 ` mikpe at it dot uu dot se
2010-04-21 7:52 ` mikpe at it dot uu dot se
2010-04-21 8:48 ` rguenther at suse dot de
2010-04-23 1:24 ` mikpe at it dot uu dot se
2010-04-23 15:47 ` rguenth at gcc dot gnu dot org
2010-04-23 15:48 ` rguenth at gcc dot gnu dot org
2010-04-26 23:47 ` pinskia at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100415183931.31231.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).