This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] FE dropping volatile qualifier?
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: 23 May 2003 21:13:45 -0400
- Subject: [tree-ssa] FE dropping volatile qualifier?
- Organization: Red Hat Canada
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.