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



             Bug #: 57044

           Summary: The following code won't compile with -std=c++0x

    Classification: Unclassified

           Product: gcc

           Version: 4.7.2

            Status: UNCONFIRMED

          Severity: major

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: pber...@yahoo.com





The following code causes a GCC internal error Segmentation fault:



class myclass

{

public:

   template<typename T_>

   inline explicit myclass(T_ *s)

   {

      char buf[mylib::someclass::some_const]; // this line causes the fault

      // ... do something useful with buf

   }



   ...      

};



// somewhere else:

nemaspace mylib

{

   class someclass

   {

   public:

      static const uint32_t some_const;

   }

}



// other info:

all GCC versions from 4.5.3 and below compile that code fine. Not tested with

other gcc versions before 4.7.2.

compile flags are CXXFLAGS="-g -O0 -pipe -std=c++0x"



Thank you.

Reply via email to