public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35227]  New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1
@ 2008-02-17  8:23 vapier at gentoo dot org
  2008-02-17  8:24 ` [Bug c/35227] " vapier at gentoo dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: vapier at gentoo dot org @ 2008-02-17  8:23 UTC (permalink / raw)
  To: gcc-bugs

on an x86_64/x86 system, a simple mandel code base crashes gcc-4.1.2 and newer:

$ gcc -c mandel.i -O1
mandel.i: In function 'mandel':
mandel.i:5: warning: incompatible implicit declaration of built-in function
'cabs'
mandel.i:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /tmp/cc4gdEy7.out file, please attach this to
your bugreport.

gcc-4.0.4 seems to work, but anything newer bombs


-- 
           Summary: [4.1/4.2 regression] gcc ICEs/segfaults when using
                    implicit cabs() with -O1
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vapier at gentoo dot org


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


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

* [Bug c/35227] [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
@ 2008-02-17  8:24 ` vapier at gentoo dot org
  2008-02-17  8:33 ` [Bug middle-end/35227] [4.1/4.2/4.3 " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vapier at gentoo dot org @ 2008-02-17  8:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from vapier at gentoo dot org  2008-02-17 08:23 -------
Created an attachment (id=15174)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15174&action=view)
mandel.i


-- 


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


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

* [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs/segfaults when using implicit cabs() with -O1
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
  2008-02-17  8:24 ` [Bug c/35227] " vapier at gentoo dot org
@ 2008-02-17  8:33 ` pinskia at gcc dot gnu dot org
  2008-02-17 12:17 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-17  8:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|c                           |middle-end
            Summary|[4.1/4.2 regression] gcc    |[4.1/4.2/4.3 regression] gcc
                   |ICEs/segfaults when using   |ICEs/segfaults when using
                   |implicit cabs() with -O1    |implicit cabs() with -O1
   Target Milestone|---                         |4.2.4


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


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

* [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs/segfaults when using implicit cabs() with -O1
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
  2008-02-17  8:24 ` [Bug c/35227] " vapier at gentoo dot org
  2008-02-17  8:33 ` [Bug middle-end/35227] [4.1/4.2/4.3 " pinskia at gcc dot gnu dot org
@ 2008-02-17 12:17 ` rguenth at gcc dot gnu dot org
  2008-02-17 14:03 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-17 12:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-02-17 12:16 -------
#0  0x084ccf42 in init_parameter_lattice_values ()
    at /home/richard/src/trunk/gcc/tree-complex.c:170
#1  0x084d5053 in tree_lower_complex ()
    at /home/richard/src/trunk/gcc/tree-complex.c:1506
#2  0x083e99eb in execute_one_pass (pass=0x8bd2a60)
    at /home/richard/src/trunk/gcc/passes.c:1122

we don't have a default-def for C even though it seems it is marked
as register.  And is so after into-ssa already.

<bb 2>:
D.1177_2 = (double) py_1(D);
D.1178_3 = COMPLEX_EXPR <D.1177_2, 0.0>;
C_4 = D.1178_3 * __complex__ (0.0, 1.0e+0);
D.1180_5 = cabs (C_4);
D.1179_6 = (int) D.1180_5;
return D.1179_6;

is it a bogus assumption that every symbol has a default definition?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-17 12:16:57
               date|                            |


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


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

* [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs/segfaults when using implicit cabs() with -O1
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (2 preceding siblings ...)
  2008-02-17 12:17 ` rguenth at gcc dot gnu dot org
@ 2008-02-17 14:03 ` rguenth at gcc dot gnu dot org
  2008-02-17 14:13 ` [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs for functions with unused complex argument rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-17 14:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-02-17 14:02 -------
Indeed it is.  Other callers check this.  Mine.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-02-17 12:16:57         |2008-02-17 14:02:32
               date|                            |


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


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

* [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs for functions with unused complex argument
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (3 preceding siblings ...)
  2008-02-17 14:03 ` rguenth at gcc dot gnu dot org
@ 2008-02-17 14:13 ` rguenth at gcc dot gnu dot org
  2008-02-17 15:08 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-17 14:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-02-17 14:12 -------
Unrelated to the implicit cabs() decl:

double cabs(double _Complex);
double mandel(double _Complex C)
{
        int py;
        C = (__extension__ 1.0iF) * (double)py;
        return cabs(C);
}

I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
           Priority|P3                          |P1
            Summary|[4.1/4.2/4.3 regression] gcc|[4.1/4.2/4.3 regression] gcc
                   |ICEs/segfaults when using   |ICEs for functions with
                   |implicit cabs() with -O1    |unused complex argument


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


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

* [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs for functions with unused complex argument
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (4 preceding siblings ...)
  2008-02-17 14:13 ` [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs for functions with unused complex argument rguenth at gcc dot gnu dot org
@ 2008-02-17 15:08 ` rguenth at gcc dot gnu dot org
  2008-02-17 15:11 ` [Bug middle-end/35227] [4.1/4.2 " rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-17 15:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-02-17 15:07 -------
Subject: Bug 35227

Author: rguenth
Date: Sun Feb 17 15:06:53 2008
New Revision: 132379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132379
Log:
2008-02-17  Richard Guenther  <rguenther@suse.de>

        PR middle-end/35227
        * tree-complex.c (init_parameter_lattice_values): Handle parameters
        without default definition.

        * gcc.dg/torture/pr35227.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr35227.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-complex.c


-- 


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


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

* [Bug middle-end/35227] [4.1/4.2 regression] gcc ICEs for functions with unused complex argument
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (5 preceding siblings ...)
  2008-02-17 15:08 ` rguenth at gcc dot gnu dot org
@ 2008-02-17 15:11 ` rguenth at gcc dot gnu dot org
  2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-17 15:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-02-17 15:11 -------
Fixed on the trunk.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
      Known to work|4.0.4                       |4.0.4 4.3.0
            Summary|[4.1/4.2/4.3 regression] gcc|[4.1/4.2 regression] gcc
                   |ICEs for functions with     |ICEs for functions with
                   |unused complex argument     |unused complex argument


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


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

* [Bug middle-end/35227] [4.1/4.2 regression] gcc ICEs for functions with unused complex argument
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (6 preceding siblings ...)
  2008-02-17 15:11 ` [Bug middle-end/35227] [4.1/4.2 " rguenth at gcc dot gnu dot org
@ 2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
  2008-07-04 23:01 ` [Bug middle-end/35227] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-31 15:14 ` jsm28 at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2008-05-19 20:24 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug middle-end/35227] [4.2 regression] gcc ICEs for functions with unused complex argument
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (7 preceding siblings ...)
  2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
@ 2008-07-04 23:01 ` jsm28 at gcc dot gnu dot org
  2009-03-31 15:14 ` jsm28 at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 23:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2008-07-04 23:00 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 regression] gcc    |[4.2 regression] gcc ICEs
                   |ICEs for functions with     |for functions with unused
                   |unused complex argument     |complex argument


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


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

* [Bug middle-end/35227] [4.2 regression] gcc ICEs for functions with unused complex argument
  2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
                   ` (8 preceding siblings ...)
  2008-07-04 23:01 ` [Bug middle-end/35227] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-31 15:14 ` jsm28 at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 15:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jsm28 at gcc dot gnu dot org  2009-03-31 15:13 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.1.2 4.2.3                 |4.1.2 4.2.3 4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-31 15:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-17  8:23 [Bug c/35227] New: [4.1/4.2 regression] gcc ICEs/segfaults when using implicit cabs() with -O1 vapier at gentoo dot org
2008-02-17  8:24 ` [Bug c/35227] " vapier at gentoo dot org
2008-02-17  8:33 ` [Bug middle-end/35227] [4.1/4.2/4.3 " pinskia at gcc dot gnu dot org
2008-02-17 12:17 ` rguenth at gcc dot gnu dot org
2008-02-17 14:03 ` rguenth at gcc dot gnu dot org
2008-02-17 14:13 ` [Bug middle-end/35227] [4.1/4.2/4.3 regression] gcc ICEs for functions with unused complex argument rguenth at gcc dot gnu dot org
2008-02-17 15:08 ` rguenth at gcc dot gnu dot org
2008-02-17 15:11 ` [Bug middle-end/35227] [4.1/4.2 " rguenth at gcc dot gnu dot org
2008-05-19 20:34 ` jsm28 at gcc dot gnu dot org
2008-07-04 23:01 ` [Bug middle-end/35227] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-31 15:14 ` jsm28 at gcc dot gnu dot 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).