public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38536]  New: ICE with C_LOC in resolve.c due to not properly going through expr->ref
@ 2008-12-15 20:34 burnus at gcc dot gnu dot org
  2008-12-26 22:55 ` [Bug fortran/38536] " mikael at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-12-15 20:34 UTC (permalink / raw)
  To: gcc-bugs

There are two C_LOC issues related to not going through all expr->ref. The
second one was found by Scot Breitenfeld (in PR 36771 comment 4), the first one
I found while trying to reduce it.

 * * *

use iso_c_binding
character(len=2),target :: str(2)
print *, c_loc(str(1))
end

Result:
  Gives no error
Expected:
  Error: CHARACTER argument 'str' to 'c_loc' at (1) must have a length of 1

Using C_LOC(str) an error is printed. Seemingly, is_scalar_expr_ptr either does
not work or it is the wrong function for the check in resolve.c's
gfc_iso_c_func_interface.

 * * *

The following program gives:

Internal Error at (1):
Unexpected expression reference type in gfc_iso_c_func_interface

The problem also occurs in resolve.c's gfc_iso_c_func_interface, though at a
different line.


  USE ISO_C_BINDING
  TYPE test
     CHARACTER(LEN=2), DIMENSION(1:2) :: c
     INTEGER(C_INT) :: i
  END TYPE test
  TYPE(test), TARGET :: chrScalar
  TYPE(C_PTR) :: f_ptr

  f_ptr = c_loc(chrScalar%c(1)(1:1))
  end


-- 
           Summary: ICE with C_LOC in resolve.c due to not properly going
                    through expr->ref
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 26+ messages in thread
[parent not found: <bug-38536-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-03-25 17:56 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-15 20:34 [Bug fortran/38536] New: ICE with C_LOC in resolve.c due to not properly going through expr->ref burnus at gcc dot gnu dot org
2008-12-26 22:55 ` [Bug fortran/38536] " mikael at gcc dot gnu dot org
2008-12-26 23:06 ` mikael at gcc dot gnu dot org
2008-12-27 11:41 ` dominiq at lps dot ens dot fr
2008-12-27 13:02 ` dominiq at lps dot ens dot fr
2008-12-27 23:24 ` mikael at gcc dot gnu dot org
2008-12-30 22:48 ` mikael at gcc dot gnu dot org
2008-12-31 15:38 ` brtnfld at hdfgroup dot org
2009-01-04 12:27 ` dominiq at lps dot ens dot fr
2009-01-04 13:01 ` mikael at gcc dot gnu dot org
2010-05-02 15:09 ` dfranke at gcc dot gnu dot org
2010-05-03 14:50 ` brtnfld at hdfgroup dot org
     [not found] <bug-38536-4@http.gcc.gnu.org/bugzilla/>
2011-01-09  0:47 ` tkoenig at gcc dot gnu.org
2011-01-09 15:33 ` burnus at gcc dot gnu.org
2011-01-09 15:38 ` dominiq at lps dot ens.fr
2011-01-09 16:00 ` burnus at gcc dot gnu.org
2011-01-09 16:00 ` tkoenig at gcc dot gnu.org
2011-01-09 16:02 ` tkoenig at netcologne dot de
2011-01-13 20:02 ` tkoenig at gcc dot gnu.org
2011-01-14  9:59 ` burnus at gcc dot gnu.org
2011-01-14 19:53 ` tkoenig at gcc dot gnu.org
2011-01-22 19:23 ` tkoenig at gcc dot gnu.org
2011-01-25 16:26 ` burnus at gcc dot gnu.org
2012-08-26  9:14 ` mikael at gcc dot gnu.org
2013-03-25 15:54 ` burnus at gcc dot gnu.org
2013-03-25 17:56 ` burnus 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).