This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] FE dropping volatile qualifier?


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]