From 1652f9faa2056132e58b57fb57f6f60405c1efce Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 10 2019 14:31:34 +0000 Subject: import devtoolset-7-gcc-7.3.1-5.16.el7 --- diff --git a/SOURCES/gcc7-pr85496.patch b/SOURCES/gcc7-pr85496.patch new file mode 100644 index 0000000..7c6ffa9 --- /dev/null +++ b/SOURCES/gcc7-pr85496.patch @@ -0,0 +1,44 @@ +2018-04-23 Eric Botcazou + + PR middle-end/85496 + * expr.c (store_field): In the bitfield case, if the value comes from + a function call and is returned in registers by means of a PARALLEL, + do not change the mode of the temporary unless BLKmode and VOIDmode. + + * g++.dg/torture/pr85496.C: New test. + +--- gcc/testsuite/g++.dg/torture/pr85496.C (nonexistent) ++++ gcc/testsuite/g++.dg/torture/pr85496.C (revision 259576) +@@ -0,0 +1,18 @@ ++// PR middle-end/85496 ++// Reported by Marek Polacek ++ ++template class complex; ++template complex<_Tp> operator*(complex<_Tp>, complex<_Tp>); ++template <> struct complex { _Complex float _M_value; }; ++class A { ++ complex _f0, _f1; ++ ++public: ++ complex &m_fn1() { return _f1; } ++}; ++complex a; ++void cos() { ++ A b; ++ complex c; ++ b.m_fn1() = c * a; ++} +--- gcc/expr.c (revision 259575) ++++ gcc/expr.c (revision 259576) +@@ -6893,8 +6893,9 @@ + if (GET_CODE (temp) == PARALLEL) + { + HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); +- machine_mode temp_mode +- = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT); ++ machine_mode temp_mode = GET_MODE (temp); ++ if (temp_mode == BLKmode || temp_mode == VOIDmode) ++ temp_mode = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT); + rtx temp_target = gen_reg_rtx (temp_mode); + emit_group_store (temp_target, temp, TREE_TYPE (exp), size); + temp = temp_target; diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index 8beffec..b2cc788 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -95,7 +95,7 @@ Summary: GCC version 7 Name: %{?scl_prefix}gcc Version: %{gcc_version} -Release: %{gcc_release}.15%{?dist} +Release: %{gcc_release}.16%{?dist} # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD @@ -261,6 +261,7 @@ Patch15: gcc7-pr84128.patch Patch16: gcc7-rh1570967.patch Patch17: gcc7-pr86138.patch Patch18: gcc7-rh1660242.patch +Patch19: gcc7-pr85496.patch Patch1000: gcc7-libstdc++-compat.patch Patch1001: gcc7-alt-compat-test.patch @@ -695,6 +696,7 @@ This package contains the Memory Protection Extensions static runtime libraries. %patch16 -p0 -b .rh1570967~ %patch17 -p0 -b .pr86138~ %patch18 -p1 -b .rh1660242~ +%patch19 -p0 -b .pr85496~ %if 0%{?rhel} <= 7 %patch1000 -p0 -b .libstdc++-compat~ @@ -2910,6 +2912,9 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Tue Jul 9 2019 Marek Polacek 7.3.1-5.16 +- apply a patch for middle-end/85496 (#1570308) + * Mon Dec 17 2018 Jeff Law 7.3.1-5.15 - Fix C++ ICE (#1660242)