public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21761] New: mainline gcc causing internal compiler error.
@ 2005-05-26  1:15 uttamp at us dot ibm dot com
  2005-05-26  5:43 ` [Bug target/21761] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-05-26  1:15 UTC (permalink / raw)
  To: gcc-bugs

test case:
$ cat bug1.c
void f1()
{
  long bit=0, exponent;
  exponent = -exponent;
  for (bit = 1; exponent; bit <<= 1)
      if (exponent & bit)
              exponent ^= bit;
}

# Compilation parameters
$ gcc -c -O3 -m64 bug1,c

gcc gives internal compiler error on Powerpc platform.

bug1.c: In function &#8216;f1&#8217;:
bug1.c:8: error: could not split insn
(insn:TI 13 11 14 (parallel [
            (set (reg:CC 75 7 [125])
                (compare:CC (neg:DI (reg/v:DI 0 0 [orig:119 exponent ] [119]))
                    (const_int 0 [0x0])))
            (set (reg/v:DI 0 0 [orig:118 exponent.1 ] [118])
                (neg:DI (reg/v:DI 0 0 [orig:119 exponent ] [119])))
        ]) 76 {*rs6000.md:1653} (nil)
    (nil))
bug1.c:8: internal compiler error: in final_scan_insn, at final.c:2419
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Compiler works with all other optimization flags.

After doing reghunt I found a patch, which may not necessarily have caused the
above failure but compiler started failing after application of this patch, 

http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00232.html

-- 
           Summary: mainline gcc causing internal compiler error.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uttamp at us dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org,geoffk at gcc dot gnu
                    dot org,uttamp at us dot ibm dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
  2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
@ 2005-05-26  5:43 ` pinskia at gcc dot gnu dot org
  2005-05-26  6:58 ` geoffk at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-26  5:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-26 01:15 -------
Confirmed.  Also happens on powerpc-darwin with -m64.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
          Component|c                           |target
     Ever Confirmed|                            |1
  GCC build triplet|powerpc64-linux             |
   GCC host triplet|powerpc64-linux             |
 GCC target triplet|powerpc64-linux             |powerpc64-*-*
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.1.0
      Known to work|                            |4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-26 01:15:24
               date|                            |
            Summary|mainline gcc causing        |[4.1 Regression] mainline
                   |internal compiler error.    |gcc causing internal
                   |                            |compiler error.
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
  2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
  2005-05-26  5:43 ` [Bug target/21761] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-26  6:58 ` geoffk at gcc dot gnu dot org
  2005-05-26 18:49 ` uttamp at us dot ibm dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2005-05-26  6:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2005-05-26 06:50 -------
This should fix it:

*** rs6000.md.~1.367.~  Sat May 14 22:06:45 2005
--- rs6000.md   Wed May 25 23:48:56 2005
***************
*** 1672,1678 ****
                    (const_int 0)))
     (set (match_operand:P 0 "gpc_reg_operand" "")
        (neg:P (match_dup 1)))]
!   "TARGET_32BIT && reload_completed"
    [(set (match_dup 0)
        (neg:P (match_dup 1)))
     (set (match_dup 2)
--- 1672,1678 ----
                    (const_int 0)))
     (set (match_operand:P 0 "gpc_reg_operand" "")
        (neg:P (match_dup 1)))]
!   "reload_completed"
    [(set (match_dup 0)
        (neg:P (match_dup 1)))
     (set (match_dup 2)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |geoffk at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-05-26 01:15:24         |2005-05-26 06:50:58
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
  2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
  2005-05-26  5:43 ` [Bug target/21761] [4.1 Regression] " pinskia at gcc dot gnu dot org
  2005-05-26  6:58 ` geoffk at gcc dot gnu dot org
@ 2005-05-26 18:49 ` uttamp at us dot ibm dot com
  2005-05-30  6:13 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-05-26 18:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uttamp at us dot ibm dot com  2005-05-26 18:23 -------
(In reply to comment #0)
> test case:
> $ cat bug1.c
> void f1()
> {
>   long bit=0, exponent;
>   exponent = -exponent;
>   for (bit = 1; exponent; bit <<= 1)
>       if (exponent & bit)
>               exponent ^= bit;
> }
> 
> # Compilation parameters
> $ gcc -c -O3 -m64 bug1,c
> 
> gcc gives internal compiler error on Powerpc platform.
> 
> bug1.c: In function &#8216;f1&#8217;:
> bug1.c:8: error: could not split insn
> (insn:TI 13 11 14 (parallel [
>             (set (reg:CC 75 7 [125])
>                 (compare:CC (neg:DI (reg/v:DI 0 0 [orig:119 exponent ] [119]))
>                     (const_int 0 [0x0])))
>             (set (reg/v:DI 0 0 [orig:118 exponent.1 ] [118])
>                 (neg:DI (reg/v:DI 0 0 [orig:119 exponent ] [119])))
>         ]) 76 {*rs6000.md:1653} (nil)
>     (nil))
> bug1.c:8: internal compiler error: in final_scan_insn, at final.c:2419
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> 
> Compiler works with all other optimization flags.

I didn't mean to mislead anybody with my earlier comment. But actually compiler
fails with all optimization flags (-O2 and above). And a test case also has one
change to make it more generic type. In the original test case 'exponent' was
just a local and unitialized variable.

void f1(long exponent)
{
   long bit=0;
   exponent = -exponent;
   for (bit = 1; exponent; bit <<= 1)
       if (exponent & bit)
               exponent ^= bit;
}

> 
> After doing reghunt I found a patch, which may not necessarily have caused the
> above failure but compiler started failing after application of this patch, 
> 
> http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00232.html



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
  2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
                   ` (2 preceding siblings ...)
  2005-05-26 18:49 ` uttamp at us dot ibm dot com
@ 2005-05-30  6:13 ` cvs-commit at gcc dot gnu dot org
  2005-05-30  7:39 ` geoffk at gcc dot gnu dot org
  2005-06-01 23:31 ` uttamp at us dot ibm dot com
  5 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-30  6:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-30 06:10 -------
Subject: Bug 21761

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	geoffk@gcc.gnu.org	2005-05-30 06:10:06

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr21761.c 

Log message:
	2005-05-29  Geoffrey Keating  <geoffk@apple.com>
	
	PR target/21761
	* config/rs6000/rs6000.md: Remove stray TARGET_32BIT from
	pattern involving `:P'.
	
	Index: testsuite/ChangeLog
	2005-05-29  Geoffrey Keating  <geoffk@apple.com>
	
	PR target/21761
	* gcc.c-torture/compile/pr21761.c: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8944&r2=2.8945
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.369&r2=1.370
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5557&r2=1.5558
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr21761.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
  2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
                   ` (3 preceding siblings ...)
  2005-05-30  6:13 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-30  7:39 ` geoffk at gcc dot gnu dot org
  2005-06-01 23:31 ` uttamp at us dot ibm dot com
  5 siblings, 0 replies; 8+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2005-05-30  7:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2005-05-30 06:13 -------
Should work now, but please verify.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
  2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
                   ` (4 preceding siblings ...)
  2005-05-30  7:39 ` geoffk at gcc dot gnu dot org
@ 2005-06-01 23:31 ` uttamp at us dot ibm dot com
  5 siblings, 0 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-06-01 23:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uttamp at us dot ibm dot com  2005-06-01 23:31 -------
I've verified that this bug has been fixed in mainline gcc.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/21761] [4.1 Regression] mainline gcc causing internal compiler error.
       [not found] <bug-21761-4@http.gcc.gnu.org/bugzilla/>
@ 2021-02-16 17:34 ` seurer at gcc dot gnu.org
  0 siblings, 0 replies; 8+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-02-16 17:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21761

seurer at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|VERIFIED                    |CLOSED
                 CC|                            |seurer at gcc dot gnu.org

--- Comment #7 from seurer at gcc dot gnu.org ---
This was fixed long ago.  Closing.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-16 17:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-26  1:15 [Bug c/21761] New: mainline gcc causing internal compiler error uttamp at us dot ibm dot com
2005-05-26  5:43 ` [Bug target/21761] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-26  6:58 ` geoffk at gcc dot gnu dot org
2005-05-26 18:49 ` uttamp at us dot ibm dot com
2005-05-30  6:13 ` cvs-commit at gcc dot gnu dot org
2005-05-30  7:39 ` geoffk at gcc dot gnu dot org
2005-06-01 23:31 ` uttamp at us dot ibm dot com
     [not found] <bug-21761-4@http.gcc.gnu.org/bugzilla/>
2021-02-16 17:34 ` seurer at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).