public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: Re: Code generation problem with gcc-4.6.1
Date: Sun, 27 Nov 2011 13:41:00 -0000	[thread overview]
Message-ID: <87ehwt3f1f.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87ipm53j7m.fsf@fencepost.gnu.org> (David Kastrup's message of	"Sun, 27 Nov 2011 12:20:29 +0100")

David Kastrup <dak@gnu.org> writes:

P.S.:

> A workaround has been compiling with the options
>
> -fkeep-inline-functions -fno-crossjumping
>
> I don't know which of the two options is responsible for avoiding the
> problem but can test if it makes a difference to you.

It is -fkeep-inline-functions that does the trick.  The generated code
does not generate a _jump_ to Grob::internal_set_property in this case
(for whatever fuzzy reason), but rather a _call_, and with the right
parameters.

Compilation options I forgot to mention are -O2 -fwrapv.  Unfortunately,
an attempt of extracting a toy version of this bug (by taking the
original code and replacing all relevant calls and structures with dummy
declarations in a similar spirit) has not been successful so far, as the
generated code of the toy version is ok even when jumping instead of
calling.

So the problem appears to trigger only under quite specific conditions.

-- 
David Kastrup


       reply	other threads:[~2011-11-27 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ipm53j7m.fsf@fencepost.gnu.org>
2011-11-27 13:41 ` David Kastrup [this message]
2011-11-27 18:36   ` David Kastrup

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=87ehwt3f1f.fsf@fencepost.gnu.org \
    --to=dak@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).