diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C new file mode 100644 index 0000000..e0ede73 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C @@ -0,0 +1,36 @@ +// PR c++/55879 +// { dg-do compile { target c++11 } } + +class CAddress +{ +public: + constexpr CAddress(unsigned long begin) : m_Begin(begin) {} + constexpr CAddress(const CAddress &other) : m_Begin(other.m_Begin) {} + +private: + unsigned long m_Begin; +}; + +extern "C" char _lnkDDRRAM; +/* internal compiler error on gcc 4.6.3 */ +const CAddress s_Memmap[2] +{ + {(unsigned long)&_lnkDDRRAM}, /* segmentation fault */ + {0x40000000}, +}; + +class CNested { +public: + constexpr CNested(const CAddress primary) + : m_PrimaryBlock(primary) {} + +private: + CAddress m_PrimaryBlock; +}; + +/* internal compiler error on gcc 4.7.2 */ +const CNested s_taskDescriptions[2] +{ + {{0x42000000}}, + {{0x43000000}}, +}; |