svn commit: r512547 - head/lang/gcc10-devel/files
Gerald Pfeifer
gerald at FreeBSD.org
Sun Sep 22 02:48:28 UTC 2019
Author: gerald
Date: Sun Sep 22 02:48:28 2019
New Revision: 512547
URL: https://svnweb.freebsd.org/changeset/ports/512547
Log:
Fix a miscompilation of GCC due to undefined behavior. This originally
triggered when building with clang on amd64 (under some circumstances),
but is a general issue.
PR: 240387
Kudos to: dim (for first class detective work)
Added:
head/lang/gcc10-devel/files/patch-pr240387 (contents, props changed)
Added: head/lang/gcc10-devel/files/patch-pr240387
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/gcc10-devel/files/patch-pr240387 Sun Sep 22 02:48:28 2019 (r512547)
@@ -0,0 +1,26 @@
+This fixes FreeBSD PR240387, a bootstrap failure with clang.
+
+2019-09-20 Richard Biener <rguenther at suse.de>
+
+ PR target/91767
+ * config/i386/i386-features.c (general_scalar_chain::convert_registers):
+ Ensure there's a sequence point between allocating the new register
+ and passing a reference to a reg via regno_reg_rtx.
+
+--- UTC
+Index: gcc/config/i386/i386-features.c
+===================================================================
+--- gcc/config/i386/i386-features.c (revision 275988)
++++ gcc/config/i386/i386-features.c (revision 275989)
+@@ -1210,7 +1210,10 @@
+ bitmap_iterator bi;
+ unsigned id;
+ EXECUTE_IF_SET_IN_BITMAP (defs_conv, 0, id, bi)
+- defs_map.put (regno_reg_rtx[id], gen_reg_rtx (smode));
++ {
++ rtx chain_reg = gen_reg_rtx (smode);
++ defs_map.put (regno_reg_rtx[id], chain_reg);
++ }
+ EXECUTE_IF_SET_IN_BITMAP (insns_conv, 0, id, bi)
+ for (df_ref ref = DF_INSN_UID_DEFS (id); ref; ref = DF_REF_NEXT_LOC (ref))
+ if (bitmap_bit_p (defs_conv, DF_REF_REGNO (ref)))
More information about the svn-ports-head
mailing list