forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiler crash on erroneous code

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Fri Nov 18, 2005 1:09 am    Post subject: Compiler crash on erroneous code Reply with quote

While experimenting around my problem with the strings module [url="http://forums.silverfrost.com/forums/forum.asp?forumid=3&page=0&select=898#xx898xx"]http://forums.silverfrost.com/forums/forum.asp?forumid=3&page=0&select=898#xx898xx[/url] I accidentally mistyped the name of a dummy argument to be the same as that of its type, as in this short example:
[pre]
module derived_type_3
type t
integer :: i,j
end type

contains
subroutine copy(t,t2)
type(t) :: t,t2

t2%i = t%i
t2%j = t%j
end subroutine copy

end module derived_type_3
[/pre]

Of course this is wrong, the first dummy argument should not be named like the derived type.
But when I compile this I get a compiler crash with the following error report:
[pre]
Runtime error from program:c:tempdevf95ftn95ftn95.exe
Access Violation
The instruction at address 0040c08d attempted to read from location 00000001

0040a8fc parse_declaration_statement(<ptr>char,int,int,<ref>int) [+1791]

00411e8b handle_token(<ptr>char,int,int,int,int,<ref>int) [+0df5]

0041a59c get_implicit_interfaces(void)#B [+0748]

0041b86a process_contained_interfaces(void) [+00cc]

00411e8b handle_token(<ptr>char,int,int,int,int,<ref>int) [+0df5]

0040514d ProcessEntireLine(void) [+0695]

0040619b compile(<ptr>char) [+00ce]

00401000 main [+049b]


eax=040830ac ebx=005b58fd ecx=00000000
edx=00000054 esi=00000005 edi=03f6f214
ebp=0383f8cc esp=0383f7d8 IOPL=2
ds=0023 es=0023 fs=003b
gs=0000 cs=001b ss=0023
flgs=00010206 [NC EP NZ SN DN NV]

0040c08d testb [ecx+0x1],0x4
0040c091 je 40c1c7
0040c097 mov edx,[ebp-0x44]
[/pre]

Should the compiler not rather point out the conflict between name and type of the dummy argument ?



Johny
Back to top
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 191
Location: Manchester

PostPosted: Sat Nov 19, 2005 5:17 am    Post subject: Compiler crash on erroneous code Reply with quote

Johny

You are correct, the compiler should not crash like that. It is a bug.

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Nov 24, 2005 7:22 am    Post subject: Compiler crash on erroneous code Reply with quote

Johny

This bug has now been fixed and the fix will be included in the next release.
Back to top
View user's profile Send private message AIM Address
Johny



Joined: 17 Nov 2005
Posts: 2

PostPosted: Tue Nov 29, 2005 11:45 am    Post subject: Compiler crash on erroneous code Reply with quote

Paul,

thank you
I hope the next release doesn't take too long
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Nov 30, 2005 12:25 am    Post subject: Compiler crash on erroneous code Reply with quote

A new release will be ready today and is expected to be uploaded later this week or early next week.
Back to top
View user's profile Send private message AIM Address
JohnyBergmann



Joined: 21 Nov 2005
Posts: 5

PostPosted: Fri Jan 13, 2006 12:41 am    Post subject: Compiler crash on erroneous code Reply with quote

Hello,
with the new release 4.90, the above code does not crash the compiler anymore. The compiler correctly diagnoses an error in the code.

Johny
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group