Backported from mainline
2017-02-21 Jakub Jelinek <jakub@redhat.com>
PR c++/79641
* c-common.c (handle_mode_attribute): Use build_qualified_type to
preserve quals.
* c-c++-common/pr79641.c: New test.
From-SVN: r248648
+2017-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2017-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79641
+ * c-common.c (handle_mode_attribute): Use build_qualified_type to
+ preserve quals.
+
2017-05-10 Richard Biener <rguenther@suse.de>
Backport from mainline
return NULL_TREE;
}
- *node = typefm;
+ *node = build_qualified_type (typefm, TYPE_QUALS (type));
}
return NULL_TREE;
Backported from mainline
2017-02-21 Jakub Jelinek <jakub@redhat.com>
+ PR c++/79641
+ * c-c++-common/pr79641.c: New test.
+
PR target/79494
* gcc.dg/pr79494.c: New test.
--- /dev/null
+/* PR c++/79641 */
+/* { dg-do compile } */
+
+const int __attribute__((__mode__ (__QI__))) i = 0;