Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
g95 bug: renaming an intrinsic used from amodule
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jfh  
View profile  
 More options Jul 31 2012, 9:43 pm
From: jfh <john.har...@vuw.ac.nz>
Date: Tue, 31 Jul 2012 18:43:21 -0700 (PDT)
Local: Tues, Jul 31 2012 9:43 pm
Subject: g95 bug: renaming an intrinsic used from amodule

The following program appears to expose a bug in g95 0.93. A workaround is
to insert a statement saying
  intrinsic huge
in the module. Without it, g95 fails to realise that big is generic. The
program compiles as is and runs happily with gfortran, nagfor and Sun f95.
The problem is caused by huge being renamed big when the module is used.

cayley[~/Jfh] % cat testonly6.f90
module bla
  integer :: i=huge(1)
end module bla
program test
  use bla, only: i, big => huge
  print*, i, big(1),big(1.0),big(1d0)
end program test
cayley[~/Jfh] % g95 testonly6.f90
In file testonly6.f90:6

  print*, i, big(1),big(1.0),big(1d0)
                        2        1
Warning (155): Inconsistent types (REAL(8)/REAL(4)) in actual argument
lists at (1) and (2)
In file testonly6.f90:6

  print*, i, big(1),big(1.0),big(1d0)
                 2               1
Warning (155): Inconsistent types (REAL(8)/INTEGER(4)) in actual argument
lists at (1) and (2)
/tmp/ccgPoa3M.o: In function `MAIN_':
testonly6.f90:(.text+0x77): undefined reference to `_g95_huge'
testonly6.f90:(.text+0xa6): undefined reference to `_g95_huge'
testonly6.f90:(.text+0xd2): undefined reference to `_g95_huge'
cayley[~/Jfh] %

-- JFH


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »