public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Diego Novillo <dnovillo@redhat.com>
To: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Cc: Jason Merrill <jason@redhat.com>
Subject: [tree-ssa] FE dropping volatile qualifier?
Date: Sat, 24 May 2003 01:36:00 -0000	[thread overview]
Message-ID: <1053738824.6937.165.camel@frodo.toronto.redhat.com> (raw)


The patch for removing INDIRECT_REF nodes is causing several mudflap
failures.  The problem is that these tests tend to have trivially dead
code.  For instance, testsuite/libmudflap.c/fail13-frag.c:

int main ()
{
(*((struct a*) &k)).z = 'q';
                                                                                
return 0;
}

A few days ago, I "fixed" these cases by adding volatile, but we seem to
be removing that qualifier at some point in the parser.  If I change the
line above to "(*((volatile struct a*) &k)).z = 'q'", we get the
following out of the parser (before gimplification):

int main ()
{
  ((struct a *)&k)->z = 113;
  return 0;
}

Notice that volatile is now gone.  I'm not very proficient with language
issues, but shouldn't the volatile bit be kept?

The SSA optimizers honor the volatile qualifier, but the FE is
apparently removing it.


Thanks.  Diego.


             reply	other threads:[~2003-05-24  1:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-24  1:36 Diego Novillo [this message]
2003-05-24  1:23 ` Jason Merrill

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=1053738824.6937.165.camel@frodo.toronto.redhat.com \
    --to=dnovillo@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.com \
    /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).