public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2
Date: Thu, 23 Jul 2015 05:21:00 -0000 [thread overview]
Message-ID: <bug-66930-4-XtODX7YFb6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66930-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930
--- Comment #6 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Created attachment 36040
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36040&action=edit
.i file for gengtype.c
I've confirmed a miscompile for gengtype.c with -O1 on my 5/6
compilers. With them,
if (union_p)
{
oprintf (d->of, "%*sbreak;\n", d->indent, "");
d->indent -= 2;
}
lines in gengtype.c:walk_type function are compiled like as:
bf .L2253
mov.l .L2593,r7
mov.l @(36,r12),r6
mov.l .L2580,r5
mov.l .L2595,r1
jsr @r1
...
i.e. the instruction testing union_p variable is removed.
The resulted gengtype produces files without "break" in many
cases. Although it's the other way around with the reported
full of "break" symptom, I think the both are the same issue.
The deletion has happened in sh_split_movrt_negc_to_movt_xor
which is called by movrt_negc insn_and_split. It seems that
that splitting is applied for the case
tst reg,reg
mov #-1,reg1
negc reg1,reg1
...
call ...
...
tst reg,reg
and the last tst was removed. Oleg, could you take a look into
this?
BTW, I guess that
> * Build with -O1 on sh4 (try to work around PR target/66358).
will open a can of worms :-)
next prev parent reply other threads:[~2015-07-23 5:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-66930-4@http.gcc.gnu.org/bugzilla/>
2015-07-19 2:32 ` olegendo at gcc dot gnu.org
2015-07-20 9:21 ` glaubitz at physik dot fu-berlin.de
2015-07-20 13:25 ` glaubitz at physik dot fu-berlin.de
2015-07-20 13:46 ` glaubitz at physik dot fu-berlin.de
2015-07-21 16:46 ` glaubitz at physik dot fu-berlin.de
2015-07-23 5:21 ` kkojima at gcc dot gnu.org [this message]
2015-07-23 8:03 ` glaubitz at physik dot fu-berlin.de
2015-07-23 8:59 ` kkojima at gcc dot gnu.org
2015-07-23 9:08 ` glaubitz at physik dot fu-berlin.de
2015-07-23 13:48 ` olegendo at gcc dot gnu.org
2015-07-24 0:08 ` kkojima at gcc dot gnu.org
2015-07-24 3:47 ` olegendo at gcc dot gnu.org
2015-07-24 13:40 ` kkojima at gcc dot gnu.org
2015-07-24 13:41 ` kkojima at gcc dot gnu.org
2015-07-25 11:04 ` olegendo at gcc dot gnu.org
2015-07-25 14:14 ` olegendo at gcc dot gnu.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=bug-66930-4-XtODX7YFb6@http.gcc.gnu.org/bugzilla/ \
--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).