public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "r0bertz at gentoo dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/38052] genautomata segfaults when -O2 is enabled
Date: Fri, 07 Nov 2008 15:42:00 -0000	[thread overview]
Message-ID: <20081107154129.27215.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38052-16496@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from r0bertz at gentoo dot org  2008-11-07 15:41 -------
(In reply to comment #0)
> The problem with output_translate_vect_name is this function has two calls to
> fprintf, and they are called for the first time in this program. 

Another thing I don't understand is why fprintf elsewhere is replaced with
fwrite including in the output_range_type function, but it is still itself in
output_translate_vect_name.

I have done an experiment. Please take a look at the beginning of
output_translate_vect_name function:
0x0040647c <output_translate_vect_name+0>:      addiu  sp,sp,-8
0x00406480 <output_translate_vect_name+4>:      lw     v0,4(a1)
0x00406484 <output_translate_vect_name+8>:      sw     gp,4(sp)
0x00406488 <output_translate_vect_name+12>:     lui    gp,0x44
0x0040648c <output_translate_vect_name+16>:     beqz   v0,0x4064b0
<output_translate_vect_name+52>
0x00406490 <output_translate_vect_name+20>:     addiu  gp,gp,4240
0x00406494 <output_translate_vect_name+24>:     lw     t9,-32532(gp)
0x00406498 <output_translate_vect_name+28>:     lui    a1,0x42
0x0040649c <output_translate_vect_name+32>:     lw     gp,4(sp)
0x004064a0 <output_translate_vect_name+36>:     lw     a2,0(v0)
0x004064a4 <output_translate_vect_name+40>:     addiu  a1,a1,-8008
0x004064a8 <output_translate_vect_name+44>:     jr     t9

If I replace the following instruction with nop, then the genautomata will
succeed.
0x0040649c <output_translate_vect_name+32>:     lw     gp,4(sp)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38052


  reply	other threads:[~2008-11-07 15:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 15:33 [Bug c/38052] New: " r0bertz at gentoo dot org
2008-11-07 15:42 ` r0bertz at gentoo dot org [this message]
2008-11-10 22:46 ` [Bug target/38052] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-11-12  1:02 ` kumba at gentoo dot org
2008-11-13  9:54 ` r0bertz at gentoo dot org
2008-11-13 11:38 ` r0bertz at gentoo dot org
2008-11-13 17:28 ` r0bertz at gentoo dot org
2008-11-13 17:35 ` ebotcazou at gcc dot gnu dot org
2008-11-15 20:43 ` rsandifo at gcc dot gnu dot org
2008-11-16 20:28 ` rsandifo at gcc dot gnu dot org
2008-11-16 20:34 ` rsandifo at gcc dot gnu dot org
2008-11-16 21:10 ` rsandifo 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=20081107154129.27215.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).