Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: Syntax chec...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 12 of 14 Topic 8187 of 8775
Post > Topic >>

Re: Syntax check for IMPLICIT statement

by Herman D. Knoble <SkipKnobleLESS@[EMAIL PROTECTED] > Apr 28, 2008 at 07:57 AM

On Sun, 27 Apr 2008 21:15:11 -0600, "James Van Buskirk"
<not_valid@[EMAIL PROTECTED]
> wrote:

-|"James Van Buskirk" <not_valid@[EMAIL PROTECTED]
> wrote in message 
-|news:wpmdnYLdJ7wLl4jVnZ2dnUVZ_jednZ2d@[EMAIL PROTECTED]
|
-|> As you can see, this program is capable of reproducing the ifort
-|> error but I haven't been able to make a small program that
-|> reproduces the gfortran ICE.
-|
-|I still haven't been able to distill the above-mentioned ICE, but
-|here's a pretty small one:
-|
-|C:\gfortran\clf\startest>type bug1.f90
-|module bug1
-|   use ISO_C_BINDING
-|   implicit none
-|   contains
-|      subroutine sub1(x)
-|         type(C_PTR) x
-|         write(*,'(z16.16)') transfer(x,0_C_INTPTR_T)
-|      end subroutine sub1
-|      subroutine sub2(x)
-|         type(C_FUNPTR) x
-|         write(*,'(z16.16)') transfer(x,0_C_INTPTR_T)
-|      end subroutine sub2
-|end module bug1
-|
-|program test
-|   use bug1
-|   implicit none
-|   call sub1(transfer(7_C_INTPTR_T,C_NULL_PTR))
-|   call sub2(transfer(7_C_INTPTR_T,C_NULL_FUNPTR))
-|end program test

This one fails using g95

Skip

-|
-|C:\gfortran\clf\startest>gfortran bug1.f90 -obug1
-|bug1.f90:7: internal compiler error: Segmentation fault
-|Please submit a full bug re****t,
-|with preprocessed source if appropriate.
-|See <http://gcc.gnu.org/bugs.html>
for instructions.
-|
-|What seems to be getting gfortran down is the TRANSFERs in
-|the actual arguments.  Switching to C_LOC for the invocation
-|of sub1 fixes that call up, but for sub2 you have to go all
-|the way to a tem****ary variable to prevent ICE:
-|
-|C:\gfortran\clf\startest>type bug1a.f90
-|module bug1
-|   use ISO_C_BINDING
-|   implicit none
-|   contains
-|      subroutine sub1(x)
-|         type(C_PTR) x
-|         write(*,'(z16.16)') transfer(x,0_C_INTPTR_T)
-|      end subroutine sub1
-|      subroutine sub2(x)
-|         type(C_FUNPTR) x
-|         write(*,'(z16.16)') transfer(x,0_C_INTPTR_T)
-|      end subroutine sub2
-|      subroutine sub3() bind(C)
-|      end subroutine sub3
-|end module bug1
-|
-|program test
-|   use bug1
-|   implicit none
-|   integer, target :: i
-|   type(C_FUNPTR) p
-|
-|   p = C_FUNLOC(sub3)
-|   call sub1(C_LOC(i))
-|   call sub2(C_FUNLOC(sub3)) ! Causes ICE
-|   call sub2(p) ! No ICE
-|end program test
-|
-|C:\gfortran\clf\startest>gfortran bug1a.f90 -obug1a
-|bug1a.f90: In function 'test':
-|bug1a.f90:25: internal compiler error: in expand_expr_addr_expr_1, at 
-|expr.c:680
-|3
-|Please submit a full bug re****t,
-|with preprocessed source if appropriate.
-|See <http://gcc.gnu.org/bugs.html>
for instructions.
 




 14 Posts in Topic:
Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-27 17:22:05 
Re: Syntax check for IMPLICIT statement
glen herrmannsfeldt <g  2008-04-27 15:46:23 
Re: Syntax check for IMPLICIT statement
"Michael Metcalf&quo  2008-04-27 23:42:29 
Re: Syntax check for IMPLICIT statement
glen herrmannsfeldt <g  2008-04-27 17:45:16 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-27 21:15:11 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-27 23:11:09 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-28 00:32:40 
Re: Syntax check for IMPLICIT statement
"James Van Buskirk&q  2008-04-28 01:10:52 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:55:29 
Re: Syntax check for IMPLICIT statement
Janne Blomqvist <foo@[  2008-04-28 10:28:49 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:52:59 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:57:06 
Re: Syntax check for IMPLICIT statement
Herman D. Knoble <Skip  2008-04-28 07:44:21 
Re: Syntax check for IMPLICIT statement
Steve Lionel <Steve.Li  2008-04-28 12:01:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 3:20:56 CDT 2008.