import gcc-8.5.0-3.el8
This commit is contained in:
parent
784208a1dc
commit
d77226d8b0
@ -1,3 +1,3 @@
|
|||||||
6d0269f5a6a1907dfb48cb6d8b64538bde7f1f6d SOURCES/gcc-8.4.1-20200928.tar.xz
|
b7245af5eab1d4055b6590b6e4f5fb3b7f6c24bf SOURCES/gcc-8.5.0-20210514.tar.xz
|
||||||
3bdb3cc01fa7690a0e20ea5cfffcbe690f7665eb SOURCES/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz
|
3bdb3cc01fa7690a0e20ea5cfffcbe690f7665eb SOURCES/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz
|
||||||
ce8eb83be0ac37fb5d5388df455a980fe37b4f13 SOURCES/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz
|
ce8eb83be0ac37fb5d5388df455a980fe37b4f13 SOURCES/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
SOURCES/gcc-8.4.1-20200928.tar.xz
|
SOURCES/gcc-8.5.0-20210514.tar.xz
|
||||||
SOURCES/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz
|
SOURCES/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz
|
||||||
SOURCES/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz
|
SOURCES/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz
|
||||||
|
@ -6943,7 +6943,7 @@
|
|||||||
offload_additional_options=
|
offload_additional_options=
|
||||||
offload_additional_lib_paths=
|
offload_additional_lib_paths=
|
||||||
|
|
||||||
@@ -15392,25 +15403,27 @@ if test x"$enable_offload_targets" != x;
|
@@ -15403,10 +15403,10 @@ if test x"$enable_offload_targets" != x;
|
||||||
for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do
|
for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do
|
||||||
tgt_dir=`echo $tgt | grep '=' | sed 's/.*=//'`
|
tgt_dir=`echo $tgt | grep '=' | sed 's/.*=//'`
|
||||||
tgt=`echo $tgt | sed 's/=.*//'`
|
tgt=`echo $tgt | sed 's/=.*//'`
|
||||||
@ -6955,13 +6955,23 @@
|
|||||||
+ tgt_plugin=intelmic
|
+ tgt_plugin=intelmic
|
||||||
;;
|
;;
|
||||||
nvptx*)
|
nvptx*)
|
||||||
|
case "${target}" in
|
||||||
|
@@ -15418,19 +15418,21 @@ if test x"$enable_offload_targets" != x;
|
||||||
|
PLUGIN_NVPTX=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
- tgt_name=nvptx
|
- tgt_name=nvptx
|
||||||
+ tgt_plugin=nvptx
|
+ tgt_plugin=nvptx
|
||||||
PLUGIN_NVPTX=$tgt
|
PLUGIN_NVPTX=$tgt
|
||||||
- PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
- PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
||||||
- PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
- PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
||||||
- PLUGIN_NVPTX_LIBS='-lcuda'
|
- PLUGIN_NVPTX_LIBS='-lcuda'
|
||||||
-
|
+ if test "x$CUDA_DRIVER_LIB" != xno \
|
||||||
|
+ && test "x$CUDA_DRIVER_LIB" != xno; then
|
||||||
|
+ PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
||||||
|
+ PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
||||||
|
+ PLUGIN_NVPTX_LIBS='-lcuda'
|
||||||
|
|
||||||
- PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
- PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
||||||
- CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
- CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
||||||
- PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
- PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
||||||
@ -6969,12 +6979,6 @@
|
|||||||
- PLUGIN_NVPTX_save_LIBS=$LIBS
|
- PLUGIN_NVPTX_save_LIBS=$LIBS
|
||||||
- LIBS="$PLUGIN_NVPTX_LIBS $LIBS"
|
- LIBS="$PLUGIN_NVPTX_LIBS $LIBS"
|
||||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
+ if test "x$CUDA_DRIVER_LIB" != xno \
|
|
||||||
+ && test "x$CUDA_DRIVER_LIB" != xno; then
|
|
||||||
+ PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
|
||||||
+ PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
|
||||||
+ PLUGIN_NVPTX_LIBS='-lcuda'
|
|
||||||
+
|
|
||||||
+ PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
+ PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
||||||
+ CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
+ CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
||||||
+ PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
+ PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
||||||
@ -6985,7 +6989,7 @@
|
|||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include "cuda.h"
|
#include "cuda.h"
|
||||||
int
|
int
|
||||||
@@ -15426,13 +15439,16 @@ if ac_fn_c_try_link "$LINENO"; then :
|
@@ -15446,13 +15448,16 @@ if ac_fn_c_try_link "$LINENO"; then :
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
@ -9273,7 +9277,7 @@
|
|||||||
offload_additional_options=
|
offload_additional_options=
|
||||||
offload_additional_lib_paths=
|
offload_additional_lib_paths=
|
||||||
AC_SUBST(offload_additional_options)
|
AC_SUBST(offload_additional_options)
|
||||||
@@ -142,36 +152,41 @@ if test x"$enable_offload_targets" != x;
|
@@ -152,10 +152,10 @@ if test x"$enable_offload_targets" != x;
|
||||||
for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do
|
for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do
|
||||||
tgt_dir=`echo $tgt | grep '=' | sed 's/.*=//'`
|
tgt_dir=`echo $tgt | grep '=' | sed 's/.*=//'`
|
||||||
tgt=`echo $tgt | sed 's/=.*//'`
|
tgt=`echo $tgt | sed 's/=.*//'`
|
||||||
@ -9285,13 +9289,23 @@
|
|||||||
+ tgt_plugin=intelmic
|
+ tgt_plugin=intelmic
|
||||||
;;
|
;;
|
||||||
nvptx*)
|
nvptx*)
|
||||||
|
case "${target}" in
|
||||||
|
@@ -167,30 +167,35 @@ if test x"$enable_offload_targets" != x;
|
||||||
|
PLUGIN_NVPTX=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
- tgt_name=nvptx
|
- tgt_name=nvptx
|
||||||
+ tgt_plugin=nvptx
|
+ tgt_plugin=nvptx
|
||||||
PLUGIN_NVPTX=$tgt
|
PLUGIN_NVPTX=$tgt
|
||||||
- PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
- PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
||||||
- PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
- PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
||||||
- PLUGIN_NVPTX_LIBS='-lcuda'
|
- PLUGIN_NVPTX_LIBS='-lcuda'
|
||||||
-
|
+ if test "x$CUDA_DRIVER_LIB" != xno \
|
||||||
|
+ && test "x$CUDA_DRIVER_LIB" != xno; then
|
||||||
|
+ PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
||||||
|
+ PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
||||||
|
+ PLUGIN_NVPTX_LIBS='-lcuda'
|
||||||
|
|
||||||
- PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
- PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
||||||
- CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
- CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
||||||
- PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
- PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
||||||
@ -9306,12 +9320,6 @@
|
|||||||
- CPPFLAGS=$PLUGIN_NVPTX_save_CPPFLAGS
|
- CPPFLAGS=$PLUGIN_NVPTX_save_CPPFLAGS
|
||||||
- LDFLAGS=$PLUGIN_NVPTX_save_LDFLAGS
|
- LDFLAGS=$PLUGIN_NVPTX_save_LDFLAGS
|
||||||
- LIBS=$PLUGIN_NVPTX_save_LIBS
|
- LIBS=$PLUGIN_NVPTX_save_LIBS
|
||||||
+ if test "x$CUDA_DRIVER_LIB" != xno \
|
|
||||||
+ && test "x$CUDA_DRIVER_LIB" != xno; then
|
|
||||||
+ PLUGIN_NVPTX_CPPFLAGS=$CUDA_DRIVER_CPPFLAGS
|
|
||||||
+ PLUGIN_NVPTX_LDFLAGS=$CUDA_DRIVER_LDFLAGS
|
|
||||||
+ PLUGIN_NVPTX_LIBS='-lcuda'
|
|
||||||
+
|
|
||||||
+ PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
+ PLUGIN_NVPTX_save_CPPFLAGS=$CPPFLAGS
|
||||||
+ CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
+ CPPFLAGS="$PLUGIN_NVPTX_CPPFLAGS $CPPFLAGS"
|
||||||
+ PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
+ PLUGIN_NVPTX_save_LDFLAGS=$LDFLAGS
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<a class="link" href="https://www.fsf.org" target="_top">FSF
|
<a class="link" href="https://www.fsf.org" target="_top">FSF
|
||||||
</a>
|
</a>
|
||||||
</p><p>
|
</p><p>
|
||||||
+ Release 8.4.1
|
+ Release 8.5.0
|
||||||
+ </p><p>
|
+ </p><p>
|
||||||
Permission is granted to copy, distribute and/or modify this
|
Permission is granted to copy, distribute and/or modify this
|
||||||
document under the terms of the GNU Free Documentation
|
document under the terms of the GNU Free Documentation
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</p><p>
|
</p><p>
|
||||||
- The API documentation, rendered into HTML, can be viewed online
|
- The API documentation, rendered into HTML, can be viewed online
|
||||||
+ The API documentation, rendered into HTML, can be viewed locally
|
+ The API documentation, rendered into HTML, can be viewed locally
|
||||||
+ <a class="link" href="api/index.html" target="_top">for the 8.4.1 release</a>,
|
+ <a class="link" href="api/index.html" target="_top">for the 8.5.0 release</a>,
|
||||||
+ online
|
+ online
|
||||||
<a class="link" href="http://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
|
<a class="link" href="http://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
|
||||||
and
|
and
|
||||||
|
137
SOURCES/gcc8-pr100797.patch
Normal file
137
SOURCES/gcc8-pr100797.patch
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
commit ebfe8b28d40746ff33724bd5b9ade2552e619213
|
||||||
|
Author: Jason Merrill <jason@redhat.com>
|
||||||
|
Date: Thu May 27 23:54:52 2021 -0400
|
||||||
|
|
||||||
|
c++: 'this' adjustment for devirtualized call
|
||||||
|
|
||||||
|
My patch for 95719 made us do a better job of finding the actual virtual
|
||||||
|
function we want to call, but didn't update the 'this' pointer adjustment to
|
||||||
|
match.
|
||||||
|
|
||||||
|
This backport also incorporates a bit of the r11-1638 reorganization.
|
||||||
|
|
||||||
|
PR c++/100797
|
||||||
|
PR c++/95719
|
||||||
|
|
||||||
|
gcc/cp/ChangeLog:
|
||||||
|
|
||||||
|
* call.c (build_over_call): Adjust base_binfo in
|
||||||
|
resolves_to_fixed_type_p case.
|
||||||
|
|
||||||
|
gcc/testsuite/ChangeLog:
|
||||||
|
|
||||||
|
* g++.dg/inherit/virtual15.C: New test.
|
||||||
|
* g++.dg/inherit/virtual15a.C: New test.
|
||||||
|
|
||||||
|
--- gcc/cp/call.c
|
||||||
|
+++ gcc/cp/call.c
|
||||||
|
@@ -8309,19 +8309,6 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
|
||||||
|
|| CLASSTYPE_FINAL (TYPE_METHOD_BASETYPE (TREE_TYPE (fn))))
|
||||||
|
flags |= LOOKUP_NONVIRTUAL;
|
||||||
|
|
||||||
|
- /* If we know the dynamic type of the object, look up the final overrider
|
||||||
|
- in the BINFO. */
|
||||||
|
- if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0
|
||||||
|
- && resolves_to_fixed_type_p (arg))
|
||||||
|
- {
|
||||||
|
- tree binfo = cand->conversion_path;
|
||||||
|
- if (BINFO_TYPE (binfo) != DECL_CONTEXT (fn))
|
||||||
|
- binfo = lookup_base (binfo, DECL_CONTEXT (fn), ba_unique,
|
||||||
|
- NULL, complain);
|
||||||
|
- fn = lookup_vfn_in_binfo (DECL_VINDEX (fn), binfo);
|
||||||
|
- flags |= LOOKUP_NONVIRTUAL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* [class.mfct.nonstatic]: If a nonstatic member function of a class
|
||||||
|
X is called for an object that is not of type X, or of a type
|
||||||
|
derived from X, the behavior is undefined.
|
||||||
|
@@ -8331,10 +8318,6 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
|
||||||
|
gcc_assert (TYPE_PTR_P (parmtype));
|
||||||
|
/* Convert to the base in which the function was declared. */
|
||||||
|
gcc_assert (cand->conversion_path != NULL_TREE);
|
||||||
|
- converted_arg = build_base_path (PLUS_EXPR,
|
||||||
|
- arg,
|
||||||
|
- cand->conversion_path,
|
||||||
|
- 1, complain);
|
||||||
|
/* Check that the base class is accessible. */
|
||||||
|
if (!accessible_base_p (TREE_TYPE (argtype),
|
||||||
|
BINFO_TYPE (cand->conversion_path), true))
|
||||||
|
@@ -8349,10 +8332,33 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
|
||||||
|
/* If fn was found by a using declaration, the conversion path
|
||||||
|
will be to the derived class, not the base declaring fn. We
|
||||||
|
must convert from derived to base. */
|
||||||
|
- base_binfo = lookup_base (TREE_TYPE (TREE_TYPE (converted_arg)),
|
||||||
|
+ base_binfo = lookup_base (cand->conversion_path,
|
||||||
|
TREE_TYPE (parmtype), ba_unique,
|
||||||
|
NULL, complain);
|
||||||
|
- converted_arg = build_base_path (PLUS_EXPR, converted_arg,
|
||||||
|
+
|
||||||
|
+ /* If we know the dynamic type of the object, look up the final overrider
|
||||||
|
+ in the BINFO. */
|
||||||
|
+ if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0
|
||||||
|
+ && resolves_to_fixed_type_p (arg))
|
||||||
|
+ {
|
||||||
|
+ tree ov = lookup_vfn_in_binfo (DECL_VINDEX (fn), base_binfo);
|
||||||
|
+
|
||||||
|
+ /* And unwind base_binfo to match. If we don't find the type we're
|
||||||
|
+ looking for in BINFO_INHERITANCE_CHAIN, we're looking at diamond
|
||||||
|
+ inheritance; for now do a normal virtual call in that case. */
|
||||||
|
+ tree octx = DECL_CONTEXT (ov);
|
||||||
|
+ tree obinfo = base_binfo;
|
||||||
|
+ while (obinfo && !SAME_BINFO_TYPE_P (BINFO_TYPE (obinfo), octx))
|
||||||
|
+ obinfo = BINFO_INHERITANCE_CHAIN (obinfo);
|
||||||
|
+ if (obinfo)
|
||||||
|
+ {
|
||||||
|
+ fn = ov;
|
||||||
|
+ base_binfo = obinfo;
|
||||||
|
+ flags |= LOOKUP_NONVIRTUAL;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ converted_arg = build_base_path (PLUS_EXPR, arg,
|
||||||
|
base_binfo, 1, complain);
|
||||||
|
|
||||||
|
argarray[j++] = converted_arg;
|
||||||
|
--- /dev/null
|
||||||
|
+++ gcc/testsuite/g++.dg/inherit/virtual15.C
|
||||||
|
@@ -0,0 +1,18 @@
|
||||||
|
+// PR c++/100797
|
||||||
|
+// { dg-do run }
|
||||||
|
+
|
||||||
|
+bool ok = false;
|
||||||
|
+struct S1 { virtual ~S1() {} };
|
||||||
|
+struct S2 { virtual void f1() = 0; };
|
||||||
|
+struct S3: S1, S2 {
|
||||||
|
+ void f1() { f2(); }
|
||||||
|
+ virtual void f2() = 0;
|
||||||
|
+};
|
||||||
|
+struct S4: S3 {
|
||||||
|
+ void f2() { ok = true; }
|
||||||
|
+ using S2::f1;
|
||||||
|
+};
|
||||||
|
+int main() {
|
||||||
|
+ S4().f1();
|
||||||
|
+ if (!ok) __builtin_abort ();
|
||||||
|
+}
|
||||||
|
--- /dev/null
|
||||||
|
+++ gcc/testsuite/g++.dg/inherit/virtual15a.C
|
||||||
|
@@ -0,0 +1,19 @@
|
||||||
|
+// PR c++/100797 plus diamond inheritance
|
||||||
|
+// { dg-do run }
|
||||||
|
+
|
||||||
|
+bool ok = false;
|
||||||
|
+struct S1 { virtual ~S1() {} };
|
||||||
|
+struct S2 { virtual void f1() = 0; };
|
||||||
|
+struct S3: S1, virtual S2 {
|
||||||
|
+ void f1() { f2(); }
|
||||||
|
+ virtual void f2() = 0;
|
||||||
|
+};
|
||||||
|
+struct SX: virtual S2 { };
|
||||||
|
+struct S4: SX, S3 {
|
||||||
|
+ void f2() { ok = true; }
|
||||||
|
+ using S2::f1;
|
||||||
|
+};
|
||||||
|
+int main() {
|
||||||
|
+ S4().f1();
|
||||||
|
+ if (!ok) __builtin_abort ();
|
||||||
|
+}
|
@ -1,96 +0,0 @@
|
|||||||
2020-09-28 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
|
|
||||||
Revert:
|
|
||||||
2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
|
|
||||||
Mark Eggleston <markeggleston@gcc.gnu.org>
|
|
||||||
|
|
||||||
PR fortran/95614
|
|
||||||
* decl.c (gfc_get_common): Use gfc_match_common_name instead
|
|
||||||
of match_common_name.
|
|
||||||
* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
|
|
||||||
of match_common_name.
|
|
||||||
* match.c : Rename match_common_name to gfc_match_common_name.
|
|
||||||
* match.c (gfc_match_common): Use gfc_match_common_name instead
|
|
||||||
of match_common_name.
|
|
||||||
* match.h : Rename match_common_name to gfc_match_common_name.
|
|
||||||
* resolve.c (resolve_common_vars): Check each symbol in a
|
|
||||||
common block has a global symbol. If there is a global symbol
|
|
||||||
issue an error if the symbol type is known as is not a common
|
|
||||||
block name.
|
|
||||||
|
|
||||||
--- gcc/fortran/decl.c
|
|
||||||
+++ gcc/fortran/decl.c
|
|
||||||
@@ -5789,7 +5789,7 @@ get_bind_c_idents (void)
|
|
||||||
found_id = MATCH_YES;
|
|
||||||
gfc_get_ha_symbol (name, &tmp_sym);
|
|
||||||
}
|
|
||||||
- else if (gfc_match_common_name (name) == MATCH_YES)
|
|
||||||
+ else if (match_common_name (name) == MATCH_YES)
|
|
||||||
{
|
|
||||||
found_id = MATCH_YES;
|
|
||||||
com_block = gfc_get_common (name, 0);
|
|
||||||
@@ -5834,7 +5834,7 @@ get_bind_c_idents (void)
|
|
||||||
found_id = MATCH_YES;
|
|
||||||
gfc_get_ha_symbol (name, &tmp_sym);
|
|
||||||
}
|
|
||||||
- else if (gfc_match_common_name (name) == MATCH_YES)
|
|
||||||
+ else if (match_common_name (name) == MATCH_YES)
|
|
||||||
{
|
|
||||||
found_id = MATCH_YES;
|
|
||||||
com_block = gfc_get_common (name, 0);
|
|
||||||
--- gcc/fortran/match.c
|
|
||||||
+++ gcc/fortran/match.c
|
|
||||||
@@ -5028,8 +5028,7 @@ gfc_get_common (const char *name, int from_module)
|
|
||||||
|
|
||||||
/* Match a common block name. */
|
|
||||||
|
|
||||||
-match
|
|
||||||
-gfc_match_common_name (char *name)
|
|
||||||
+match match_common_name (char *name)
|
|
||||||
{
|
|
||||||
match m;
|
|
||||||
|
|
||||||
@@ -5073,7 +5072,7 @@ gfc_match_common (void)
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
- m = gfc_match_common_name (name);
|
|
||||||
+ m = match_common_name (name);
|
|
||||||
if (m == MATCH_ERROR)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
--- gcc/fortran/match.h
|
|
||||||
+++ gcc/fortran/match.h
|
|
||||||
@@ -103,9 +103,11 @@ match gfc_match_call (void);
|
|
||||||
|
|
||||||
/* We want to use this function to check for a common-block-name
|
|
||||||
that can exist in a bind statement, so removed the "static"
|
|
||||||
- declaration of the function in match.c. */
|
|
||||||
+ declaration of the function in match.c.
|
|
||||||
|
|
||||||
-match gfc_match_common_name (char *name);
|
|
||||||
+ TODO: should probably rename this now that it'll be globally seen to
|
|
||||||
+ gfc_match_common_name. */
|
|
||||||
+match match_common_name (char *name);
|
|
||||||
|
|
||||||
match gfc_match_common (void);
|
|
||||||
match gfc_match_block_data (void);
|
|
||||||
--- gcc/fortran/resolve.c
|
|
||||||
+++ gcc/fortran/resolve.c
|
|
||||||
@@ -932,16 +932,9 @@ static void
|
|
||||||
resolve_common_vars (gfc_common_head *common_block, bool named_common)
|
|
||||||
{
|
|
||||||
gfc_symbol *csym = common_block->head;
|
|
||||||
- gfc_gsymbol *gsym;
|
|
||||||
|
|
||||||
for (; csym; csym = csym->common_next)
|
|
||||||
{
|
|
||||||
- gsym = gfc_find_gsymbol (gfc_gsym_root, csym->name);
|
|
||||||
- if (gsym && gsym->type != GSYM_UNKNOWN && gsym->type != GSYM_COMMON)
|
|
||||||
- gfc_error_now ("Global entity %qs at %L cannot appear in a "
|
|
||||||
- "COMMON block at %L", gsym->name,
|
|
||||||
- &gsym->where, &csym->common_block->where);
|
|
||||||
-
|
|
||||||
/* gfc_add_in_common may have been called before, but the reported errors
|
|
||||||
have been ignored to continue parsing.
|
|
||||||
We do the checks again here. */
|
|
8227
SOURCES/gcc8-remove-old-demangle.patch
Normal file
8227
SOURCES/gcc8-remove-old-demangle.patch
Normal file
File diff suppressed because it is too large
Load Diff
64
SOURCES/gcc8-rh1960701.patch
Normal file
64
SOURCES/gcc8-rh1960701.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
--- gcc/cp/call.c
|
||||||
|
+++ gcc/cp/call.c
|
||||||
|
@@ -6904,7 +6904,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
|
||||||
|
elttype = cp_build_qualified_type
|
||||||
|
(elttype, cp_type_quals (elttype) | TYPE_QUAL_CONST);
|
||||||
|
array = build_array_of_n_type (elttype, len);
|
||||||
|
- array = finish_compound_literal (array, new_ctor, complain, fcl_c99);
|
||||||
|
+ array = finish_compound_literal (array, new_ctor, complain);
|
||||||
|
/* Take the address explicitly rather than via decay_conversion
|
||||||
|
to avoid the error about taking the address of a temporary. */
|
||||||
|
array = cp_build_addr_expr (array, complain);
|
||||||
|
@@ -10984,13 +10984,11 @@ set_up_extended_ref_temp (tree decl, tree expr, vec<tree, va_gc> **cleanups,
|
||||||
|
lvalue-rvalue conversion applied to "a glvalue of literal type
|
||||||
|
that refers to a non-volatile temporary object initialized
|
||||||
|
with a constant expression". Rather than try to communicate
|
||||||
|
- that this VAR_DECL is a temporary, just mark it constexpr.
|
||||||
|
-
|
||||||
|
- Currently this is only useful for initializer_list temporaries,
|
||||||
|
- since reference vars can't appear in constant expressions. */
|
||||||
|
+ that this VAR_DECL is a temporary, just mark it constexpr. */
|
||||||
|
DECL_DECLARED_CONSTEXPR_P (var) = true;
|
||||||
|
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (var) = true;
|
||||||
|
TREE_CONSTANT (var) = true;
|
||||||
|
+ TREE_READONLY (var) = true;
|
||||||
|
}
|
||||||
|
DECL_INITIAL (var) = init;
|
||||||
|
init = NULL_TREE;
|
||||||
|
--- gcc/cp/tree.c
|
||||||
|
+++ gcc/cp/tree.c
|
||||||
|
@@ -442,6 +442,14 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain)
|
||||||
|
|| useless_type_conversion_p (TREE_TYPE (decl),
|
||||||
|
TREE_TYPE (value)));
|
||||||
|
|
||||||
|
+ /* Set TREE_READONLY for optimization, such as gimplify_init_constructor
|
||||||
|
+ moving a constant aggregate into .rodata. */
|
||||||
|
+ if (CP_TYPE_CONST_NON_VOLATILE_P (type)
|
||||||
|
+ && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
|
||||||
|
+ && !VOID_TYPE_P (TREE_TYPE (value))
|
||||||
|
+ && reduced_constant_expression_p (value))
|
||||||
|
+ TREE_READONLY (decl) = true;
|
||||||
|
+
|
||||||
|
if (complain & tf_no_cleanup)
|
||||||
|
/* The caller is building a new-expr and does not need a cleanup. */
|
||||||
|
t = NULL_TREE;
|
||||||
|
--- /dev/null
|
||||||
|
+++ gcc/testsuite/g++.dg/cpp1y/pr95226.C
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+// PR c++/95226
|
||||||
|
+// { dg-do run { target c++14 } }
|
||||||
|
+
|
||||||
|
+#include <vector>
|
||||||
|
+
|
||||||
|
+struct T {
|
||||||
|
+ unsigned a;
|
||||||
|
+ float b {8.};
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+int main()
|
||||||
|
+{
|
||||||
|
+ T t = {1};
|
||||||
|
+ std::vector<T> tt = {{1}, {2}};
|
||||||
|
+ if (t.a != 1 || t.b != 8.0f || tt[0].a != 1 || tt[0].b != 8.0f || tt[1].a != 2 || tt[1].b != 8.0f)
|
||||||
|
+ __builtin_abort ();
|
||||||
|
+}
|
75
SOURCES/gcc8-rh1981822.patch
Normal file
75
SOURCES/gcc8-rh1981822.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From 55f40d968b0bd3be4478a9481e829a99ee0fa04f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jason Merrill <jason@redhat.com>
|
||||||
|
Date: Mon, 5 Apr 2021 22:50:44 -0400
|
||||||
|
Subject: [PATCH] c++: mangling of lambdas in default args [PR91241]
|
||||||
|
|
||||||
|
In this testcase, the parms remembered in LAMBDA_EXPR_EXTRA_SCOPE are no
|
||||||
|
longer the parms of the FUNCTION_DECL they have as their DECL_CONTEXT, so we
|
||||||
|
were mangling both lambdas as parm #0. But since the parms are numbered
|
||||||
|
from right to left we don't need to need to find them in the FUNCTION_DECL,
|
||||||
|
we can measure their own DECL_CHAIN.
|
||||||
|
|
||||||
|
gcc/cp/ChangeLog:
|
||||||
|
|
||||||
|
PR c++/91241
|
||||||
|
* mangle.c (write_compact_number): Add sanity check.
|
||||||
|
(write_local_name): Use list_length for parm number.
|
||||||
|
|
||||||
|
gcc/testsuite/ChangeLog:
|
||||||
|
|
||||||
|
PR c++/91241
|
||||||
|
* g++.dg/abi/lambda-defarg1.C: New test.
|
||||||
|
---
|
||||||
|
gcc/cp/mangle.c | 11 ++---------
|
||||||
|
gcc/testsuite/g++.dg/abi/lambda-defarg1.C | 11 +++++++++++
|
||||||
|
2 files changed, 13 insertions(+), 9 deletions(-)
|
||||||
|
create mode 100644 gcc/testsuite/g++.dg/abi/lambda-defarg1.C
|
||||||
|
|
||||||
|
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
|
||||||
|
index 6c111342b97..4399165ee23 100644
|
||||||
|
--- gcc/cp/mangle.c
|
||||||
|
+++ gcc/cp/mangle.c
|
||||||
|
@@ -1628,6 +1628,7 @@ write_literal_operator_name (tree identifier)
|
||||||
|
static void
|
||||||
|
write_compact_number (int num)
|
||||||
|
{
|
||||||
|
+ gcc_checking_assert (num >= 0);
|
||||||
|
if (num > 0)
|
||||||
|
write_unsigned_number (num - 1);
|
||||||
|
write_char ('_');
|
||||||
|
@@ -2027,15 +2028,7 @@ write_local_name (tree function, const tree local_entity,
|
||||||
|
/* For this purpose, parameters are numbered from right-to-left. */
|
||||||
|
if (parm)
|
||||||
|
{
|
||||||
|
- tree t;
|
||||||
|
- int i = 0;
|
||||||
|
- for (t = DECL_ARGUMENTS (function); t; t = DECL_CHAIN (t))
|
||||||
|
- {
|
||||||
|
- if (t == parm)
|
||||||
|
- i = 1;
|
||||||
|
- else if (i)
|
||||||
|
- ++i;
|
||||||
|
- }
|
||||||
|
+ int i = list_length (parm);
|
||||||
|
write_char ('d');
|
||||||
|
write_compact_number (i - 1);
|
||||||
|
}
|
||||||
|
diff --git a/gcc/testsuite/g++.dg/abi/lambda-defarg1.C b/gcc/testsuite/g++.dg/abi/lambda-defarg1.C
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000000..8c538581240
|
||||||
|
--- /dev/null
|
||||||
|
+++ gcc/testsuite/g++.dg/abi/lambda-defarg1.C
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+// PR c++/91241
|
||||||
|
+// { dg-do compile { target c++11 } }
|
||||||
|
+
|
||||||
|
+struct A {
|
||||||
|
+ int *b(const int & = []() -> int { return 0; }(),
|
||||||
|
+ const int & = []() -> int { return 0; }());
|
||||||
|
+};
|
||||||
|
+int *A::b(const int &, const int &) { b(); return 0; }
|
||||||
|
+// { dg-final { scan-assembler "_ZN1A1bERKiS1_" } }
|
||||||
|
+// { dg-final { scan-assembler "_ZZN1A1bERKiS1_Ed_NKUlvE_clEv" } }
|
||||||
|
+// { dg-final { scan-assembler "_ZZN1A1bERKiS1_Ed0_NKUlvE_clEv" } }
|
||||||
|
--
|
||||||
|
2.27.0
|
@ -1,10 +1,10 @@
|
|||||||
%global DATE 20200928
|
%global DATE 20210514
|
||||||
%global gitrev 8ed81e8ef69a535cbc168f55d06941bf3e4ef8ee
|
%global gitrev a3253c88425835d5b339d6998a1110a66ccd8b44
|
||||||
%global gcc_version 8.4.1
|
%global gcc_version 8.5.0
|
||||||
%global gcc_major 8
|
%global gcc_major 8
|
||||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||||
# %%{release}, append them after %%{gcc_release} on Release: line.
|
# %%{release}, append them after %%{gcc_release} on Release: line.
|
||||||
%global gcc_release 1
|
%global gcc_release 3
|
||||||
%global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f
|
%global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f
|
||||||
%global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24
|
%global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24
|
||||||
%global _unpackaged_files_terminate_build 0
|
%global _unpackaged_files_terminate_build 0
|
||||||
@ -252,7 +252,10 @@ Obsoletes: libcilkrts-static
|
|||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
AutoReq: true
|
AutoReq: true
|
||||||
|
# Various libraries are imported. #1859893 asks us to list them all.
|
||||||
Provides: bundled(libiberty)
|
Provides: bundled(libiberty)
|
||||||
|
Provides: bundled(libbacktrace)
|
||||||
|
Provides: bundled(libffi)
|
||||||
Provides: gcc(major) = %{gcc_major}
|
Provides: gcc(major) = %{gcc_major}
|
||||||
|
|
||||||
Patch0: gcc8-hack.patch
|
Patch0: gcc8-hack.patch
|
||||||
@ -272,7 +275,10 @@ Patch14: gcc8-libgcc-hardened.patch
|
|||||||
Patch15: gcc8-rh1670535.patch
|
Patch15: gcc8-rh1670535.patch
|
||||||
Patch16: gcc8-libgomp-20190503.patch
|
Patch16: gcc8-libgomp-20190503.patch
|
||||||
Patch17: gcc8-libgomp-testsuite.patch
|
Patch17: gcc8-libgomp-testsuite.patch
|
||||||
Patch18: gcc8-pr95614-revert.patch
|
Patch18: gcc8-remove-old-demangle.patch
|
||||||
|
Patch19: gcc8-rh1960701.patch
|
||||||
|
Patch20: gcc8-pr100797.patch
|
||||||
|
Patch21: gcc8-rh1981822.patch
|
||||||
|
|
||||||
Patch30: gcc8-rh1668903-1.patch
|
Patch30: gcc8-rh1668903-1.patch
|
||||||
Patch31: gcc8-rh1668903-2.patch
|
Patch31: gcc8-rh1668903-2.patch
|
||||||
@ -849,8 +855,10 @@ to NVidia PTX capable devices if available.
|
|||||||
%patch15 -p0 -b .rh1670535~
|
%patch15 -p0 -b .rh1670535~
|
||||||
%patch16 -p0 -b .libgomp-20190503~
|
%patch16 -p0 -b .libgomp-20190503~
|
||||||
%patch17 -p0 -b .libgomp-testsuite~
|
%patch17 -p0 -b .libgomp-testsuite~
|
||||||
%patch18 -p0 -b .pr95614-revert~
|
%patch18 -p0 -b .demangle~
|
||||||
rm -f gcc/testsuite/gfortran.dg/pr95614_*.f90
|
%patch19 -p0 -b .rh1960701~
|
||||||
|
%patch20 -p0 -b .pr100797~
|
||||||
|
%patch21 -p0 -b .rh1981822~
|
||||||
|
|
||||||
%patch30 -p0 -b .rh1668903-1~
|
%patch30 -p0 -b .rh1668903-1~
|
||||||
%patch31 -p0 -b .rh1668903-2~
|
%patch31 -p0 -b .rh1668903-2~
|
||||||
@ -3167,6 +3175,30 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 13 2021 Marek Polacek <polacek@redhat.com> 8.5.0-3
|
||||||
|
- fix mangling of lambdas in default args (PR c++/91241, #1981822)
|
||||||
|
- add a few Provides: bundled
|
||||||
|
|
||||||
|
* Tue Jun 1 2021 Marek Polacek <polacek@redhat.com> 8.5.0-2
|
||||||
|
- revert upstream PR85873 gcc-8 fix, apply the fix from gcc-9 (#1960701)
|
||||||
|
- fix 'this' adjustment for devirtualized call (PR c++/100797, #1965951)
|
||||||
|
|
||||||
|
* Fri May 14 2021 Marek Polacek <polacek@redhat.com> 8.5.0-1
|
||||||
|
- update from GCC 8.5 release (#1946758)
|
||||||
|
- this includes a fix for PR target/87839 (#1958295)
|
||||||
|
|
||||||
|
* Mon Apr 26 2021 Marek Polacek <polacek@redhat.com> 8.4.1-2.1
|
||||||
|
- remove support for demangling GCC 2.x era mangling schemes (#1668394)
|
||||||
|
|
||||||
|
* Fri Apr 23 2021 Marek Polacek <polacek@redhat.com> 8.4.1-2
|
||||||
|
- update from GCC 8.4 release (#1946758)
|
||||||
|
|
||||||
|
* Fri Apr 9 2021 Marek Polacek <polacek@redhat.com> 8.4.1-1.2
|
||||||
|
- back out the PR97236 patch
|
||||||
|
|
||||||
|
* Fri Apr 9 2021 Marek Polacek <polacek@redhat.com> 8.4.1-1.1
|
||||||
|
- fix bad use of VMAT_CONTIGUOUS (PR tree-optimization/97236, #1925632)
|
||||||
|
|
||||||
* Tue Sep 29 2020 Marek Polacek <polacek@redhat.com> 8.4.1-1
|
* Tue Sep 29 2020 Marek Polacek <polacek@redhat.com> 8.4.1-1
|
||||||
- update from GCC 8.4 release (#1868446)
|
- update from GCC 8.4 release (#1868446)
|
||||||
- remove symlinks to 32-bit versions of these static libraries: libasan.a,
|
- remove symlinks to 32-bit versions of these static libraries: libasan.a,
|
||||||
|
Loading…
Reference in New Issue
Block a user