View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Fri Nov 18, 2005 1:09 am Post subject: Compiler crash on erroneous code |
|
|
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
|
Posted: Sat Nov 19, 2005 5:17 am Post subject: Compiler crash on erroneous code |
|
|
Johny
You are correct, the compiler should not crash like that. It is a bug.
------------
Administrator
Silverfrost Forums |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Nov 24, 2005 7:22 am Post subject: Compiler crash on erroneous code |
|
|
Johny
This bug has now been fixed and the fix will be included in the next release. |
|
Back to top |
|
|
Johny
Joined: 17 Nov 2005 Posts: 2
|
Posted: Tue Nov 29, 2005 11:45 am Post subject: Compiler crash on erroneous code |
|
|
Paul,
thank you
I hope the next release doesn't take too long |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Nov 30, 2005 12:25 am Post subject: Compiler crash on erroneous code |
|
|
A new release will be ready today and is expected to be uploaded later this week or early next week. |
|
Back to top |
|
|
JohnyBergmann
Joined: 21 Nov 2005 Posts: 5
|
Posted: Fri Jan 13, 2006 12:41 am Post subject: Compiler crash on erroneous code |
|
|
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 |
|
|
|