Backport from mainline
2012-06-11 Richard Guenther <rguenther@suse.de>
PR c++/53616
* mangle.c (write_array_type): Use double-ints for array domain
arithmetic.
* g++.dg/ext/pr53605.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188615
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-06-14 Richard Guenther <rguenther@suse.de>
Backport from mainline
+ 2012-06-11 Richard Guenther <rguenther@suse.de>
+
+ PR c++/53616
+ * mangle.c (write_array_type): Use double-ints for array domain
+ arithmetic.
+
+2012-06-14 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline
2012-06-06 Fabien ChĂȘne <fabien@gcc.gnu.org>
PR c++/52841
{
/* The ABI specifies that we should mangle the number of
elements in the array, not the largest allowed index. */
- max = size_binop (PLUS_EXPR, max, size_one_node);
- write_unsigned_number (tree_low_cst (max, 1));
+ double_int dmax
+ = double_int_add (tree_to_double_int (max), double_int_one);
+ gcc_assert (double_int_fits_in_uhwi_p (dmax));
+ write_unsigned_number (dmax.low);
}
else
{
+2012-06-14 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-06-11 Richard Guenther <rguenther@suse.de>
+
+ PR c++/53616
+ * g++.dg/ext/pr53605.C: New testcase.
+
2012-06-14 Tobias Burnus <burnus@net-b.de>
PR fortran/53597
--- /dev/null
+// { dg-do compile }
+
+// Avoid -pedantic-error default
+// { dg-options "" }
+
+template <bool lhs_is_null_literal>
+class EqHelper {
+public:
+ template <typename T1, typename T2>
+ static int Compare( const T1& expected,
+ const T2& actual);
+};
+void foo(){
+ static const int kData[] = {};
+ ::EqHelper<false>::Compare(kData, "abc");
+}