Enter the following program:

int main(int argc,char **argv)
{
  float x = 0.9;
  long y  = reinterpret_cast<long &>(static_cast<float
&__attribute((may_alias))> x);

  return y;
}

and compile with 

$ g++-4.0 -O3 -Wall aliastest.cpp

Result is:

aliastest.cpp: In function 'int main(int, char**)':
aliastest.cpp:4: internal compiler error: Segmentation fault

Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.

The same bug also applies to g++-4.1.


-- 
           Summary: ICE on alias attribute casting
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: thor at math dot tu-berlin dot de
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27648

Reply via email to