native/s48_bignum.c:456: internal compiler error: in final_scan_insn, at final.c:2514 Please submit a full bug report, I'm still looking for where to attach my .i file. Hopefully I can attach it after submitting this page. uname -a: Linux frogger 2.6.12-9-amd64-generic #1 Tue Oct 4 19:23:45 BST 2005 x86_64 GNU/Linux gcc --version: gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
Created attachment 9968 [details] scheme48 bignum modified for use with Factor
Oh, can you show the command line invokation of gcc?
gcc -fpeephole2 s48_bignum.i Thanks!
(In reply to comment #2) > Oh, can you show the command line invokation of gcc? Never mind, -O0 -fpeephole2 makes it fail.
Reduced testcase for 4.0.x and above: void s48_double_to_bignum(int exponent){ long length = ((((exponent) + ((((sizeof (long)) * 8) - 2) - 1)) / (((sizeof (long)) * 8) - 2))); } This really should be filed in a different PR as that one is a regression. I will try to get a reduced testcase for 3.4.x and 3.3.x later today.
Here is the one for 3.3.3 and above: typedef long bignum_digit_type; void bignum_divide_unsigned_normalized( ){ bignum_digit_type guess; guess = ((((unsigned long) 1) << (((sizeof (bignum_digit_type)) * 8) - 2)) - 1); } I will file the other one seperate now.
(In reply to comment #5) > Reduced testcase for 4.0.x and above: Filed as PR 24330.
Confirmed that this is a real regression.
The instruction we are should have split earlier: (insn/v 8 21 26 (set (mem/c/i:DI (plus:DI (reg/f:DI 6 bp) (const_int -8 [0xfffffffffffffff8])) [0 guess+0 S8 A64]) (const_int 4611686018427387903 [0x3fffffffffffffff])) 81 {*movdi_1_rex64} (nil) (nil))
*** Bug 24330 has been marked as a duplicate of this bug. ***
It turned out the one in comment #5 is the same issue as the orginal bug too.
Subject: Bug 24315 CVSROOT: /cvs/gcc Module name: gcc Changes by: uros@gcc.gnu.org 2005-10-17 07:09:25 Modified files: gcc : ChangeLog gcc/testsuite : ChangeLog gcc/config/i386: i386.md Added files: gcc/testsuite/gcc.target/i386: pr24315.c Log message: PR target/24315 * config/i386/i386.md (*pushdi2_rex64 splitter) (*movdi_1_rex64 splitter, *ashldi3_1 splitter) (*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after flow2 pass only when (optimize > 0 && flag_peephole2). testsuite: PR target/24315 * gcc.target/i386/pr24315.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10169&r2=2.10170 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6201&r2=1.6202 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.target/i386/pr24315.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.659&r2=1.660
Fixed on mainline. The bugfix is really trivial to fix, but I don't have older branches installed here. Could somebody help me with a backports?
Subject: Bug 24315 Author: uros Date: Tue Nov 8 07:58:51 2005 New Revision: 106633 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106633 Log: PR target/19340 * reg-stack.c (reg_to_stack): Update register liveness also for flag_sched2_use_traces. PR target/24315 * config/i386/i386.md (*pushdi2_rex64 splitter) (*movdi_1_rex64 splitter, *ashldi3_1 splitter) (*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after flow2 pass only when (optimize > 0 && flag_peephole2). testsuite/ PR target/19340 * gcc.dg/pr19340.c: New test. PR target/24315 * gcc.target/i386/pr24315.c: New test. Added: branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/pr19340.c branches/gcc-4_0-branch/gcc/testsuite/gcc.target/i386/pr24315.c Modified: branches/gcc-4_0-branch/gcc/ChangeLog branches/gcc-4_0-branch/gcc/config/i386/i386.md branches/gcc-4_0-branch/gcc/reg-stack.c branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
now fixed on 4.0 branch too
Subject: Bug 24315 Author: uros Date: Thu Nov 10 07:27:47 2005 New Revision: 106728 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106728 Log: PR target/24315 * config/i386/i386.md (*pushdi2_rex64 splitter) (*movdi_1_rex64 splitter): Delay splitting after flow2 pass only when (optimize > 0 && flag_peephole2). PR target/19340 * reg-stack.c (reg_to_stack): Update register liveness also for flag_sched2_use_traces. testsuite/ PR target/24315 * gcc.dg/pr24315.c: New test. PR target/19340 * gcc.dg/pr19340.c: New test. Added: branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/pr19340.c - copied unchanged from r106632, trunk/gcc/testsuite/gcc.dg/pr19340.c branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/pr24315.c Modified: branches/gcc-3_4-branch/gcc/ChangeLog branches/gcc-3_4-branch/gcc/config/i386/i386.md branches/gcc-3_4-branch/gcc/reg-stack.c branches/gcc-3_4-branch/gcc/testsuite/ChangeLog
Fixed on 3.4 branch.