[tree-ssa] FE dropping volatile qualifier?

Diego Novillo dnovillo@redhat.com
Sat May 24 01:36:00 GMT 2003


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.




More information about the Gcc mailing list