This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/83111] [sh] stack smashing detected in gen_udivsi3
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Nov 2017 16:54:07 +0000
- Subject: [Bug target/83111] [sh] stack smashing detected in gen_udivsi3
- Auto-submitted: auto-generated
- References: <bug-83111-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83111
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |olegendo at gcc dot gnu.org
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
This looks like the offending commit:
...
commit 0e3876bfd55e2888a012d3e304196eb2d4231ecf
Author: olegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue May 3 06:47:34 2016 +0000
gcc/
* config/sh/sh.md (udivsi3, divsi3, mulsi3): Simplify.
(mulhisi3, umulhisi3, (smulsi3_highpart, umulsi3_highpart): Convert to
define_insn_and_split.
(mulsi3_i): New define_insn_and_split.
(mulsi3_call): Convert to define_insn.
(mulsidi3, mulsidi3_compact, umulsidi3, umulsidi3_compact):
Remove constraints.
...
which contains this change:
...
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index da1dfe9..2d9502b 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -2244,16 +2244,9 @@
(define_expand "udivsi3"
- [(set (match_dup 3) (symbol_ref:SI "__udivsi3"))
- (set (reg:SI R4_REG) (match_operand:SI 1 "general_operand" ""))
- (set (reg:SI R5_REG) (match_operand:SI 2 "general_operand" ""))
- (parallel [(set (match_operand:SI 0 "register_operand" "")
- (udiv:SI (reg:SI R4_REG)
- (reg:SI R5_REG)))
- (clobber (reg:SI T_REG))
- (clobber (reg:SI PR_REG))
- (clobber (reg:SI R4_REG))
- (use (match_dup 3))])]
+ [(set (match_operand:SI 0 "register_operand")
+ (udiv:SI (match_operand:SI 1 "general_operand")
+ (match_operand:SI 2 "general_operand")))]
""
{
rtx last;
...
The "operands[3]" refers to the "(match_dup 3)" that was removed here.