public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
       [not found] <bug-38849-4@http.gcc.gnu.org/bugzilla/>
@ 2012-04-26 11:49 ` janus at gcc dot gnu.org
  2013-01-15 21:34 ` mikael at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu.org @ 2012-04-26 11:49 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |

--- Comment #5 from janus at gcc dot gnu.org 2012-04-26 11:49:14 UTC ---
With gfortran 4.6.3 and later I get:


  myfortran_error(1:1) = chararr(1)
                         1
Error: The pointer object 'chararr' at (1) must have an explicit function
interface or be declared as array



The error message is not extremely clear about what is wrong, but at least
there is no ICE any more. Is it worth to improve the error message, or should
we just close this one?


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

* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
       [not found] <bug-38849-4@http.gcc.gnu.org/bugzilla/>
  2012-04-26 11:49 ` [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding janus at gcc dot gnu.org
@ 2013-01-15 21:34 ` mikael at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-01-15 21:34 UTC (permalink / raw)
  To: gcc-bugs


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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mikael at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> 2013-01-15 21:34:10 UTC ---
(In reply to comment #5)
> The error message is not extremely clear about what is wrong, but at least
> there is no ICE any more. Is it worth to improve the error message, or should
> we just close this one?

Let's close.


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

* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
  2009-01-14 20:43 [Bug fortran/38849] New: " domob at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-12-08 11:44 ` domob at gcc dot gnu dot org
@ 2010-05-19 16:57 ` dfranke at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-19 16:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dfranke at gcc dot gnu dot org  2010-05-19 16:57 -------
$ gfortran-4.5  pr38849.f90 
pr38849.f90: In function 'MAIN__':
pr38849.f90:9:0: internal compiler error: in gimplify_expr, at gimplify.c:7346

$ gfortran-svn  pr38849.f90 
gimplification failed:
chararr <addr_expr 0xb77a43b8
    type <pointer_type 0xb77a3c00
        type <function_type 0xb77a3ba0 type <void_type 0xb7729780 void>
            QI
            size <integer_cst 0xb77190f0 constant 8>
            unit size <integer_cst 0xb7719108 constant 1>
            align 8 symtab 0 alias set -1 canonical type 0xb77a3ba0
            arg-types <tree_list 0xb779ec60 value <reference_type 0xb77a3b40>
                chain <tree_list 0xb779ec78 value <integer_type 0xb77292a0
integer(kind=4)>
                    chain <tree_list 0xb779ec90 value <void_type 0xb7729780
void>>>>
            pointer_to_this <pointer_type 0xb77a3c00>>
        unsigned SI
        size <integer_cst 0xb7719240 constant 32>
        unit size <integer_cst 0xb7719078 constant 4>
        align 32 symtab 0 alias set -1 canonical type 0xb77a3c00>
    constant
    arg 0 <function_decl 0xb77a2c00 chararr type <function_type 0xb77a3ba0>
        public external QI file pr38849.f90 line 5 col 0 align 8
        chain <function_decl 0xb77a2b00 MAIN__ type <function_type 0xb774d060>
            used static QI file pr38849.f90 line 2 col 0 align 8 initial <block
0xb7727104> result <result_decl 0xb7722348 D.1499>
            (mem:QI (symbol_ref:SI ("MAIN__") [flags 0x3] <function_decl
0xb77a2b00 MAIN__>) [0 S1 A8])
            struct-function 0xb772239c chain <function_decl 0xb77a2a80
_gfortran_st_set_nml_var_dim>>>>
pr38849.f90: In function 'MAIN__':
pr38849.f90:9:0: internal compiler error: gimplification failed

$ gfortran-svn -v
gcc version 4.6.0 20100518 (experimental) (GCC)


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
      Known to fail|4.3.2 4.4.0                 |4.3.2 4.4.0 4.5.1 4.6.0


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


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

* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
  2009-01-14 20:43 [Bug fortran/38849] New: " domob at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-10-07 14:12 ` domob at gcc dot gnu dot org
@ 2009-12-08 11:44 ` domob at gcc dot gnu dot org
  2010-05-19 16:57 ` dfranke at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-12-08 11:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

domob at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|domob at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
  2009-01-14 20:43 [Bug fortran/38849] New: " domob at gcc dot gnu dot org
  2009-01-24 20:37 ` [Bug fortran/38849] " mikael at gcc dot gnu dot org
  2009-10-07 14:09 ` domob at gcc dot gnu dot org
@ 2009-10-07 14:12 ` domob at gcc dot gnu dot org
  2009-12-08 11:44 ` domob at gcc dot gnu dot org
  2010-05-19 16:57 ` dfranke at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-10-07 14:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from domob at gcc dot gnu dot org  2009-10-07 14:12 -------
As another note, I already did the mistake of indexing a string as str(n)
instead of str(n:n) for single characters multiple times; and IIRC there's not
much useful a diagnostic in any case, so maybe I can improve there as well.


-- 


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


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

* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
  2009-01-14 20:43 [Bug fortran/38849] New: " domob at gcc dot gnu dot org
  2009-01-24 20:37 ` [Bug fortran/38849] " mikael at gcc dot gnu dot org
@ 2009-10-07 14:09 ` domob at gcc dot gnu dot org
  2009-10-07 14:12 ` domob at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-10-07 14:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from domob at gcc dot gnu dot org  2009-10-07 14:09 -------
This is still happening with current gfortran trunk, though the ICE is now in

[/tmp]# gfortran-dev test.f90 
test.f90: In function 'myfortran_error':
test.f90:8:0: internal compiler error: in fold_convert_loc, at
fold-const.c:2789
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I will work on this.


-- 

domob at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |domob at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-01-24 20:36:57         |2009-10-07 14:09:36
               date|                            |


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


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

* [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding
  2009-01-14 20:43 [Bug fortran/38849] New: " domob at gcc dot gnu dot org
@ 2009-01-24 20:37 ` mikael at gcc dot gnu dot org
  2009-10-07 14:09 ` domob at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu dot org @ 2009-01-24 20:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mikael at gcc dot gnu dot org  2009-01-24 20:36 -------
Confirmed.

  myfortran_error(1:1) = chararr(1)

gfc_match_rvalue can't find a proper substring reference for chararr. 
Thus as  chararr's flavor is FL_UNKNOWN, gfc_match_rvalue tries to guess its
type
and after some tests defaults to a function call. Then, as chararr is
registered as a function it fails in the middle end when trying to convert a
pointer type to a function type.

This is not a regression as the link error from 4.3 tells us (I think) that
chararr went through the middle-end as a function. 

I think the correct syntax is:
  myfortran_error(1:1) = chararr(1:1)


-- 

mikael at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-invalid-code
      Known to fail|                            |4.3.2 4.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-24 20:36:57
               date|                            |


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


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

end of thread, other threads:[~2013-01-15 21:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-38849-4@http.gcc.gnu.org/bugzilla/>
2012-04-26 11:49 ` [Bug fortran/38849] ICE in fold_convert with C_F_POINTER and C binding janus at gcc dot gnu.org
2013-01-15 21:34 ` mikael at gcc dot gnu.org
2009-01-14 20:43 [Bug fortran/38849] New: " domob at gcc dot gnu dot org
2009-01-24 20:37 ` [Bug fortran/38849] " mikael at gcc dot gnu dot org
2009-10-07 14:09 ` domob at gcc dot gnu dot org
2009-10-07 14:12 ` domob at gcc dot gnu dot org
2009-12-08 11:44 ` domob at gcc dot gnu dot org
2010-05-19 16:57 ` dfranke 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).