public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/45586]  New: ICE non-trivial conversion at assignment
@ 2010-09-07 19:23 jv244 at cam dot ac dot uk
  2010-09-07 19:29 ` [Bug lto/45586] " jv244 at cam dot ac dot uk
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: jv244 at cam dot ac dot uk @ 2010-09-07 19:23 UTC (permalink / raw)
  To: gcc-bugs

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

I'm trying to do an lto build of CP2K, but this fails with:

/data03/vondele/clean/cp2k/makefiles/../src/qs_linres_current.F: In function
‘calculate_jrho_resp’:
/data03/vondele/clean/cp2k/makefiles/../src/qs_linres_current.F:614:0: error:
non-trivial conversion at assignment
struct array3_real(kind=8)
struct array3_real(kind=8)
# .MEM_3681 = VDEF <.MEM_3286>
my_rho = D.13693_938->r;

/data03/vondele/clean/cp2k/makefiles/../src/qs_linres_current.F:614:0: error:
non-trivial conversion at assignment
struct array3_real(kind=8)
struct array3_real(kind=8)
# .MEM_3682 = VDEF <.MEM_3681>
my_current = D.13701_946->r;

/data03/vondele/clean/cp2k/makefiles/../src/qs_linres_current.F:614:0: error:
non-trivial conversion at assignment
struct array3_real(kind=8)
struct array3_real(kind=8)
# .MEM_3750 = VDEF <.MEM_3287>
my_gauge = D.14057_1326->r;

/data03/vondele/clean/cp2k/makefiles/../src/qs_linres_current.F:614:0: internal
compiler error: verify_stmts failed
Please submit a full bug report.

Not sure how to get a testcase for this one....

It appears to be for example this pointer assignment

my_gauge=>rs_gauge(1)%rs(igrid_level)%rs_grid%r

where 

REAL(dp), DIMENSION(:, :, :), POINTER    ::  my_gauge

and r is:

  TYPE realspace_grid_type

     REAL(KIND=dp), DIMENSION ( :, :, : ), ALLOCATABLE :: r   ! the grid

  END TYPE realspace_grid_type


-- 
           Summary: ICE non-trivial conversion at assignment
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


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

* [Bug lto/45586] ICE non-trivial conversion at assignment
  2010-09-07 19:23 [Bug lto/45586] New: ICE non-trivial conversion at assignment jv244 at cam dot ac dot uk
@ 2010-09-07 19:29 ` jv244 at cam dot ac dot uk
  2010-09-07 19:30 ` [Bug lto/45586] [4.6 Regression] " jv244 at cam dot ac dot uk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: jv244 at cam dot ac dot uk @ 2010-09-07 19:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jv244 at cam dot ac dot uk  2010-09-07 19:28 -------
Simple testcase (gfortran -flto test.f90):

MODULE M1
  INTEGER, PARAMETER :: dp=8
  TYPE realspace_grid_type

     REAL(KIND=dp), DIMENSION ( :, :, : ), ALLOCATABLE :: r

  END TYPE realspace_grid_type
END MODULE

MODULE M2
 USE m1
CONTAINS
 SUBROUTINE S1(x)
  TYPE(realspace_grid_type), POINTER :: x
  REAL(dp), DIMENSION(:, :, :), POINTER    :: y
  y=>x%r
  y=0

 END SUBROUTINE
END MODULE

USE M2
  TYPE(realspace_grid_type), POINTER :: x
  ALLOCATE(x)
  ALLOCATE(x%r(10,10,10))
  CALL S1(x)
  write(6,*) x%r
END


-- 


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


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
  2010-09-07 19:23 [Bug lto/45586] New: ICE non-trivial conversion at assignment jv244 at cam dot ac dot uk
  2010-09-07 19:29 ` [Bug lto/45586] " jv244 at cam dot ac dot uk
@ 2010-09-07 19:30 ` jv244 at cam dot ac dot uk
  2010-09-08  9:36 ` rguenth at gcc dot gnu dot org
  2010-09-15 18:26 ` Joost dot VandeVondele at pci dot uzh dot ch
  3 siblings, 0 replies; 9+ messages in thread
From: jv244 at cam dot ac dot uk @ 2010-09-07 19:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jv244 at cam dot ac dot uk  2010-09-07 19:30 -------
Actually works with 4.5 but fails with trunk


-- 

jv244 at cam dot ac dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE non-trivial conversion  |[4.6 Regression] ICE non-
                   |at assignment               |trivial conversion at
                   |                            |assignment
   Target Milestone|---                         |4.6.0


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


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
  2010-09-07 19:23 [Bug lto/45586] New: ICE non-trivial conversion at assignment jv244 at cam dot ac dot uk
  2010-09-07 19:29 ` [Bug lto/45586] " jv244 at cam dot ac dot uk
  2010-09-07 19:30 ` [Bug lto/45586] [4.6 Regression] " jv244 at cam dot ac dot uk
@ 2010-09-08  9:36 ` rguenth at gcc dot gnu dot org
  2010-09-15 18:26 ` Joost dot VandeVondele at pci dot uzh dot ch
  3 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-08  9:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-09-08 09:36 -------
Confirmed.  We have two different array3_real(kind=8) record types that are
not considered compatible.  One data pointer member is restrict qualified
while the other one is not.

Why do we have an aggregate assignment of an array descriptor anyway?

  struct array3_real(kind=8) y;
  struct realspace_grid_type * D.2157;

<bb 2>:
  y.data = 0B;
  D.2157_5 = *x_4(D);
  y = D.2157_5->r;
  D.2172_6 = y.data;

The issue here is of course that LTO re-computes TYPE_CANONICAL and the FE
sets it in a way that the above situation is not detected as non-trivial
conversion.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |lto
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-08 09:36:18
               date|                            |


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


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
  2010-09-07 19:23 [Bug lto/45586] New: ICE non-trivial conversion at assignment jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2010-09-08  9:36 ` rguenth at gcc dot gnu dot org
@ 2010-09-15 18:26 ` Joost dot VandeVondele at pci dot uzh dot ch
  3 siblings, 0 replies; 9+ messages in thread
From: Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-15 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from Joost dot VandeVondele at pci dot uzh dot ch  2010-09-15 18:25 -------
If realspace_grid_type%r is declared as pointer instead of allocatable, the
testcase can be compiled, and a similar workaround in CP2K allows an LTO build
of CP2K to finish (after updating binutils to its CVS version).


-- 


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


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
       [not found] <bug-45586-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-09-30 15:50 ` rguenth at gcc dot gnu.org
@ 2010-10-21 15:28 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-21 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-21 15:28:01 UTC ---
Created attachment 22107
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22107
patch

Bootstrapped, tested and SPEC CPU 2006 tested.

I don't like it too much (it's really a FE hack we put in place that haunts
us now ...).

Deferred installing to stage3 or later (--enable-checking=release will
get you an equivalent solution).


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
       [not found] <bug-45586-4@http.gcc.gnu.org/bugzilla/>
  2010-09-24 10:43 ` Joost.VandeVondele at pci dot uzh.ch
  2010-09-24 11:17 ` Joost.VandeVondele at pci dot uzh.ch
@ 2010-09-30 15:50 ` rguenth at gcc dot gnu.org
  2010-10-21 15:28 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-09-30 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-09-30 11:49:44 UTC ---
Mine.


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
       [not found] <bug-45586-4@http.gcc.gnu.org/bugzilla/>
  2010-09-24 10:43 ` Joost.VandeVondele at pci dot uzh.ch
@ 2010-09-24 11:17 ` Joost.VandeVondele at pci dot uzh.ch
  2010-09-30 15:50 ` rguenth at gcc dot gnu.org
  2010-10-21 15:28 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 9+ messages in thread
From: Joost.VandeVondele at pci dot uzh.ch @ 2010-09-24 11:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2010-09-24 10:46:08 UTC ---
(In reply to comment #5)
> Actually, looks like there might be some vaguely related issue here in the FE,
> which I'll open in another PR.

See PR45777

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug lto/45586] [4.6 Regression] ICE non-trivial conversion at assignment
       [not found] <bug-45586-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-24 10:43 ` Joost.VandeVondele at pci dot uzh.ch
  2010-09-24 11:17 ` Joost.VandeVondele at pci dot uzh.ch
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Joost.VandeVondele at pci dot uzh.ch @ 2010-09-24 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2010-09-24 10:33:13 UTC ---
(In reply to comment #3)
> The issue here is of course that LTO re-computes TYPE_CANONICAL and the FE
> sets it in a way that the above situation is not detected as non-trivial
> conversion.

Does the fix need to be done in the FE, or will this be addressed by changes to
LTO?

Actually, looks like there might be some vaguely related issue here in the FE,
which I'll open in another PR.

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2010-10-21 15:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 19:23 [Bug lto/45586] New: ICE non-trivial conversion at assignment jv244 at cam dot ac dot uk
2010-09-07 19:29 ` [Bug lto/45586] " jv244 at cam dot ac dot uk
2010-09-07 19:30 ` [Bug lto/45586] [4.6 Regression] " jv244 at cam dot ac dot uk
2010-09-08  9:36 ` rguenth at gcc dot gnu dot org
2010-09-15 18:26 ` Joost dot VandeVondele at pci dot uzh dot ch
     [not found] <bug-45586-4@http.gcc.gnu.org/bugzilla/>
2010-09-24 10:43 ` Joost.VandeVondele at pci dot uzh.ch
2010-09-24 11:17 ` Joost.VandeVondele at pci dot uzh.ch
2010-09-30 15:50 ` rguenth at gcc dot gnu.org
2010-10-21 15:28 ` rguenth 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).