* config/rs6000/rs6000.md (div<mode>3): Use correct mode in
force_reg call.
* gcc.c-torture/execute/pr30185.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119947
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/30185
+ * config/rs6000/rs6000.md (div<mode>3): Use correct mode in
+ force_reg call.
+
2006-12-15 Andrew Pinski <pinski@gmail.com>
PR tree-opt/30140
;
else if (TARGET_POWERPC)
{
- operands[2] = force_reg (SImode, operands[2]);
+ operands[2] = force_reg (<MODE>mode, operands[2]);
if (TARGET_POWER)
{
emit_insn (gen_divsi3_mq (operands[0], operands[1], operands[2]));
+2006-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/30185
+ * gcc.c-torture/execute/pr30185.c: New test.
+
2006-12-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/30179
--- /dev/null
+/* PR target/30185 */
+
+extern void abort (void);
+
+typedef struct S { char a; long long b; } S;
+
+S
+foo (S x, S y)
+{
+ S z;
+ z.b = x.b / y.b;
+ return z;
+}
+
+int
+main (void)
+{
+ S a, b;
+ a.b = 32LL;
+ b.b = 4LL;
+ if (foo (a, b).b != 8LL)
+ abort ();
+ a.b = -8LL;
+ b.b = -2LL;
+ if (foo (a, b).b != 4LL)
+ abort ();
+ return 0;
+}