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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread
end of thread, other threads:[~2010-09-15 18:26 UTC | newest]
Thread overview: 5+ 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
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).