[Bug middle-end/43045] [lto] ICE non-trivial conversion at assignment

2010-02-22 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-02-22 14:08 ---
Created an attachment (id=19933)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19933action=view)
patch


-- 


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



[Bug middle-end/43045] [lto] ICE non-trivial conversion at assignment

2010-02-22 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2010-02-22 15:53 ---
Subject: Bug 43045

Author: rguenth
Date: Mon Feb 22 15:53:27 2010
New Revision: 156966

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=156966
Log:
2010-02-22  Richard Guenther  rguent...@suse.de

PR lto/43045
* tree-inline.c (declare_return_variable): Use the type of
the call stmt lhs if available.

* gfortran.dg/lto/20100222-1_0.f03: New testcase.
* gfortran.dg/lto/20100222-1_1.c: Likewise.

Added:
trunk/gcc/testsuite/gfortran.dg/lto/20100222-1_0.f03
trunk/gcc/testsuite/gfortran.dg/lto/20100222-1_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c


-- 


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



[Bug middle-end/43045] [lto] ICE non-trivial conversion at assignment

2010-02-22 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2010-02-22 16:03 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.5.0


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



[Bug middle-end/43045] [lto] ICE non-trivial conversion at assignment

2010-02-11 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2010-02-11 18:56 ---
Created an attachment (id=19848)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19848action=view)
Testsuite patch (char-unsigned char) to fix the last two ICEs on the input
side

Note: It works with  -O1  and fails with  -O2.

Analogously for:

gfortran -O2 -flto gfortran.dg/bind_c_usage_17.f90
gfortran.dg/bind_c_usage_17_c.c

In file included from :1:0:
gfortran.dg/bind_c_usage_17.f90: In function 'test':
gfortran.dg/bind_c_usage_17.f90:17:0: error: non-trivial conversion at
assignment
unnamed-unsigned:8
unnamed-signed:8
D.2124_1 = D.2125_53;
[...]

And for:

$ gfortran -O2 -flto gfortran.dg/bind_c_usage_16.f03
gfortran.dg/bind_c_usage_16_c.c

In file included from gfortran.dg/bind_c_usage_16.f03:23:0,
 from :3:
gfortran.dg/bind_c_usage_16_c.c: In function 'main':
gfortran.dg/bind_c_usage_16_c.c:12:5: error: non-trivial conversion at
assignment
unnamed-signed:8
unnamed-unsigned:8
c.0_1 = D.2210_12;

 * * *

Actually, for the last two ICEs, one can simply fix the test suite by using the
attached patch, which changes char into unsigned char.

But for the first failure one cannot do much as the Fortran standard has just a
  type(c_funptr)
which is a C-compatible function pointer. As this is a general black box, it is
defined by the front end as:
  unnamed type (*T499) (void)
even though in this case an  int:32 (*T4a0)(int:32)  type is needed.

(For Fortran-internal function pointers, one can give an interface and thus
create the proper function-pointer type.)


-- 


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