aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-07-08 10:24:14 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-07-08 10:24:14 -0400
commit329af3c7e9317952d68d3522e9e3aa6ac188332a (patch)
tree75549a817713216b259210ff71bebd09b571d835 /gcc/testsuite
parentb862187a34f58510107b5e77917774518ee95b69 (diff)
downloadgcc-329af3c7e9317952d68d3522e9e3aa6ac188332a.zip
gcc-329af3c7e9317952d68d3522e9e3aa6ac188332a.tar.gz
gcc-329af3c7e9317952d68d3522e9e3aa6ac188332a.tar.bz2
re PR c++/49673 ([C++0x] const variables initialised with constexpr constructor placed in .data not .rodata)
PR c++/49673 gcc/c-family/ * c-common.c (c_apply_type_quals_to_decl): Don't check TYPE_NEEDS_CONSTRUCTING. gcc/cp/ * typeck.c (cp_apply_type_quals_to_decl): Don't check TYPE_NEEDS_CONSTRUCTING. From-SVN: r176045
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C11
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 360c0aa..9393815 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/49673
+ * g++.dg/cpp0x/constexpr-rom.C: New.
+
2011-07-08 Kirill Yukhin <kirill.yukhin@intel.com>
PR middle-end/49519
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
new file mode 100644
index 0000000..e2edb2e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
@@ -0,0 +1,11 @@
+// PR c++/49673: check that test_data goes into .rodata
+// { dg-options -std=c++0x }
+// { dg-final { scan-assembler "rodata" } }
+
+struct Data
+{
+ int i;
+ constexpr Data(int i = 0) : i(i+1) {}
+};
+
+extern const Data test_data = { 1 };