public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/27373]  New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284
@ 2006-05-01 18:10 jv244 at cam dot ac dot uk
  2006-05-01 22:52 ` [Bug tree-optimization/27373] [4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jv244 at cam dot ac dot uk @ 2006-05-01 18:10 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]

gcc version 4.2.0 20060501 (experimental)

> gfortran -c -O2 bug.f90
bug.f90: In function âreset_to_next_rng_substreamâ:
bug.f90:11: internal compiler error: in add_virtual_operand, at
tree-ssa-operands.c:1284

for :

> cat bug.f90
MODULE parallel_rng_types
  INTEGER, PARAMETER :: dp=KIND(0.0D0)
  TYPE rng_stream_type
    REAL(KIND=dp), DIMENSION(3,2) :: bg,cg,ig
    LOGICAL                       :: antithetic,extended_precision
  END TYPE rng_stream_type
  TYPE cp_error_type
    INTEGER :: dum
  END TYPE
CONTAINS
  SUBROUTINE reset_to_next_rng_substream(rng_stream,error)
    TYPE(rng_stream_type), POINTER           :: rng_stream
    LOGICAL                                  :: failure
    REAL(KIND=dp), DIMENSION(3, 2)           :: u
    CALL cp_assert(ASSOCIATED(rng_stream),2,routineP,error,failure)
    IF (.NOT.failure) THEN
      rng_stream%bg = u
      rng_stream%cg = u
    END IF
  END SUBROUTINE reset_to_next_rng_substream
END MODULE


-- 
           Summary: ICE: add_virtual_operand, at tree-ssa-operands.c:1284
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk
GCC target triplet:  x86_64-unknown-linux-gnu


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand, at tree-ssa-operands.c:1284
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
@ 2006-05-01 22:52 ` pinskia at gcc dot gnu dot org
  2006-05-02  7:22 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-01 22:52 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|middle-end                  |tree-optimization
 GCC target triplet| x86_64-unknown-linux-gnu   |x86_64-unknown-linux-gnu
           Keywords|                            |ice-on-valid-code
            Summary|ICE: add_virtual_operand, at|[4.2 Regression] ICE:
                   |tree-ssa-operands.c:1284    |add_virtual_operand, at
                   |                            |tree-ssa-operands.c:1284
   Target Milestone|---                         |4.2.0


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand, at tree-ssa-operands.c:1284
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
  2006-05-01 22:52 ` [Bug tree-optimization/27373] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-05-02  7:22 ` pinskia at gcc dot gnu dot org
  2006-05-02  7:40 ` [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-02  7:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-02 07:22 -------
Confirmed, not fixed by the patch which fixes PR 26626.
Here is a reduced Fortran testcase:
MODULE parallel_rng_types
  INTEGER, PARAMETER :: dp=KIND(0.0D0)
  TYPE rng_stream_type
    REAL(KIND=dp), DIMENSION(1) :: bg,cg
    LOGICAL                       :: antithetic
  END TYPE
CONTAINS
  SUBROUTINE reset_to_next_rng_substream(rng_stream,error)
    TYPE(rng_stream_type), POINTER           :: rng_stream
    LOGICAL                                  :: failure
    CALL cp_assert(ASSOCIATED(rng_stream),routineP,error,failure)
    IF (.NOT.failure) THEN
      rng_stream%bg = u
      rng_stream%cg = u
    END IF
  END SUBROUTINE reset_to_next_rng_substream
END MODULE

-----
I might get a reduced C one soon or not.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-02 07:22:34
               date|                            |


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
  2006-05-01 22:52 ` [Bug tree-optimization/27373] [4.2 Regression] " pinskia at gcc dot gnu dot org
  2006-05-02  7:22 ` pinskia at gcc dot gnu dot org
@ 2006-05-02  7:40 ` pinskia at gcc dot gnu dot org
  2006-05-02  8:51 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-02  7:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-05-02 07:40 -------
And here is the C example (so this does not become not release blocking):
typedef struct atype
{
    float bg[1], cg[1];
    _Bool ant;
}atype;


void cp_assert(_Bool*, float*, int*, _Bool*);

void f(atype **rng_stream, int *error, float u)
{
    _Bool t = *rng_stream != 0;
    float routinep;
    _Bool failure;
    cp_assert ( &t, &routinep, error, &failure);
    if (failure == 0)
    {
        typedef float ty[1];
        ty *tt = &((*rng_stream)->bg);
        int i = 1;

        do 
        {
            (*tt)[i - 1] = u;
            i ++;
        }while (i > 1);
        {
            ty *tt = &(*rng_stream)->cg;
            int i = 1;

            do 
            {
                (*tt)[i - 1] = u;
                i ++;
            }while (i > 1);
        }
    }    
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org
 GCC target triplet|x86_64-unknown-linux-gnu    |
            Summary|[4.2 Regression] ICE:       |[4.2 Regression] ICE:
                   |add_virtual_operand, at     |add_virtual_operand with
                   |tree-ssa-operands.c:1284    |pointers to arrays


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2006-05-02  7:40 ` [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays pinskia at gcc dot gnu dot org
@ 2006-05-02  8:51 ` rguenth at gcc dot gnu dot org
  2006-05-02  8:56 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-05-02  8:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-05-02 08:51 -------
The patch for PR26626 doesn't fix this either.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2006-05-02  8:51 ` rguenth at gcc dot gnu dot org
@ 2006-05-02  8:56 ` rguenth at gcc dot gnu dot org
  2006-05-02 12:19 ` dberlin at dberlin dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-05-02  8:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2006-05-02 08:56 -------
ICEing in the propagator engine during copyprop:

Substituing values and folding statements

Folded statement: tt_19 = &D.1547_18->cg;
            into: tt_19 = &D.1547_12->cg;

*kaboom*

but same usual place:

#1  0x081881af in add_virtual_operand (var=0xb7d8e410, s_ann=0xb7e1a7ec, 
    flags=1, full_ref=0xb7e1a208, offset=32, size=32, for_clobber=0 '\0')
    at /space/rguenther/src/svn/trunk/gcc/tree-ssa-operands.c:1284
1284                    gcc_assert (SMT_USED_ALONE (var));

(gdb) call debug_generic_expr(stmt)
#   SMT.8D.1563_39 = V_MAY_DEF <SMT.8D.1563_14>;
D.1547_12->cgD.1522[D.1552_21] = uD.1532_16


-- 


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2006-05-02  8:56 ` rguenth at gcc dot gnu dot org
@ 2006-05-02 12:19 ` dberlin at dberlin dot org
  2006-05-14  9:00 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dberlin at dberlin dot org @ 2006-05-02 12:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dberlin at gcc dot gnu dot org  2006-05-02 12:19 -------
Subject: Re:  [4.2 Regression] ICE:
        add_virtual_operand with pointers to arrays

On Tue, 2006-05-02 at 08:56 +0000, rguenth at gcc dot gnu dot org wrote:
> 
> ------- Comment #4 from rguenth at gcc dot gnu dot org  2006-05-02 08:56 -------
> ICEing in the propagator engine during copyprop:
> 
> Substituing values and folding statements
> 
> Folded statement: tt_19 = &D.1547_18->cg;
>             into: tt_19 = &D.1547_12->cg;
> 
> *kaboom*
> 
> but same usual place:
> 
> #1  0x081881af in add_virtual_operand (var=0xb7d8e410, s_ann=0xb7e1a7ec, 
>     flags=1, full_ref=0xb7e1a208, offset=32, size=32, for_clobber=0 '\0')
>     at /space/rguenther/src/svn/trunk/gcc/tree-ssa-operands.c:1284
> 1284                    gcc_assert (SMT_USED_ALONE (var));
> 
> (gdb) call debug_generic_expr(stmt)
> #   SMT.8D.1563_39 = V_MAY_DEF <SMT.8D.1563_14>;
> D.1547_12->cgD.1522[D.1552_21] = uD.1532_16

This is a different bug, in fact.
Those two (D.1547_18 and D.1547_12) should have had the exact same SMT
base, AFAICT, and thus, should have had the same result.

What do the alias dumps look like after the patch from 26626?


-- 


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (5 preceding siblings ...)
  2006-05-02 12:19 ` dberlin at dberlin dot org
@ 2006-05-14  9:00 ` fxcoudert at gcc dot gnu dot org
  2006-05-14 19:10 ` dberlin at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-14  9:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2006-05-14 09:00 -------
Any progress on this one? It's blocking a few widely-used Fortran codes from
compiling (and being used and benchmarked) with mainline gfortran.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2006-05-02 07:22:34         |2006-05-14 09:00:21
               date|                            |


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (6 preceding siblings ...)
  2006-05-14  9:00 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-14 19:10 ` dberlin at gcc dot gnu dot org
  2006-05-17  1:16 ` dberlin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2006-05-14 19:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dberlin at gcc dot gnu dot org  2006-05-14 19:10 -------
We aren't marking smt usage for updating in forwprop, but we need to, because
forwprop is propagating and address and destroying the smt info.


-- 


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (7 preceding siblings ...)
  2006-05-14 19:10 ` dberlin at gcc dot gnu dot org
@ 2006-05-17  1:16 ` dberlin at gcc dot gnu dot org
  2006-05-17 12:08 ` dberlin at gcc dot gnu dot org
  2006-05-17 16:45 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2006-05-17  1:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dberlin at gcc dot gnu dot org  2006-05-17 01:16 -------
Subject: Bug 27373

Author: dberlin
Date: Wed May 17 01:16:08 2006
New Revision: 113840

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113840
Log:
2006-05-16  Daniel Berlin <dberlin@dberlin.org>

        Fix PR tree-optimization/27373
        * tree-ssa-forwprop.c: (forward_propagate_addr_expr_1): Add argument.
         (forward_propagate_addr_expr): Update call.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr27373.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-forwprop.c


-- 


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (8 preceding siblings ...)
  2006-05-17  1:16 ` dberlin at gcc dot gnu dot org
@ 2006-05-17 12:08 ` dberlin at gcc dot gnu dot org
  2006-05-17 16:45 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2006-05-17 12:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dberlin at gcc dot gnu dot org  2006-05-17 12:07 -------
Fixed


-- 

dberlin at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays
  2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
                   ` (9 preceding siblings ...)
  2006-05-17 12:08 ` dberlin at gcc dot gnu dot org
@ 2006-05-17 16:45 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-17 16:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-05-17 16:45 -------
*** Bug 27085 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

end of thread, other threads:[~2006-05-17 16:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-01 18:10 [Bug middle-end/27373] New: ICE: add_virtual_operand, at tree-ssa-operands.c:1284 jv244 at cam dot ac dot uk
2006-05-01 22:52 ` [Bug tree-optimization/27373] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-05-02  7:22 ` pinskia at gcc dot gnu dot org
2006-05-02  7:40 ` [Bug tree-optimization/27373] [4.2 Regression] ICE: add_virtual_operand with pointers to arrays pinskia at gcc dot gnu dot org
2006-05-02  8:51 ` rguenth at gcc dot gnu dot org
2006-05-02  8:56 ` rguenth at gcc dot gnu dot org
2006-05-02 12:19 ` dberlin at dberlin dot org
2006-05-14  9:00 ` fxcoudert at gcc dot gnu dot org
2006-05-14 19:10 ` dberlin at gcc dot gnu dot org
2006-05-17  1:16 ` dberlin at gcc dot gnu dot org
2006-05-17 12:08 ` dberlin at gcc dot gnu dot org
2006-05-17 16:45 ` pinskia 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).