- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm converting my application written in debug mode to release mode and am noticing an issue. The issue seems to be occurring in a routine that has optional arguments but no explicit interface. It works fine in debug mode but in release mode, whilst the routine is entered, it appears to crash when I do a check for the presence of one of the optional arguments (if(present(opt_arg))then.... Is this behaviour to be expected? I have attached the compiler command lines for both debug and release versions and also the routine in question. The call to this routine that causes the crash is with no optional arguments.
Link Copied
- « Previous
-
- 1
- 2
- Next »
23 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for your input on this one. The penny has now dropped! I will add an explicit interface and ensure that I always do from now on! I think what I have found confusing is that there do exist out-of-standard coding practices that can get past the compiler. I only picked this one up by the process of going from debug to release mode and getting different behaviour from the resulting executable. There have been other issues with this change of mode: 1) The switch from Debug Information Format = Full to = None highlighted different behaviour as a result of a (single) undefined variable; 2) Changing the Runtime Library from = Debug to = Full lead to an issue with duplicate library definitions LIBCMT and LIBCMTD. Thanks again. ACAR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> The penny has now dropped! -- ???
From The Urban Dictionary:
The phrase dates back to the Victorian Era and the popular penny-slot arcades.
The penny would often stick halfway down the slot and the user would then have to either wait, or give the machine a thump before the 'penny finally dropped' and they could begin playing.
The plays between compiler options and buggy code can be as variegated and full of surprises as the plays between Wile E. Coyote and B.B. Roadrunner.
From The Urban Dictionary:
The phrase dates back to the Victorian Era and the popular penny-slot arcades.
The penny would often stick halfway down the slot and the user would then have to either wait, or give the machine a thump before the 'penny finally dropped' and they could begin playing.
The plays between compiler options and buggy code can be as variegated and full of surprises as the plays between Wile E. Coyote and B.B. Roadrunner.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're right mecej4! I've just looked at a couple of those plays and think that I'll look at them again whenever I get 'cheesed-off' with my buggy code!!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »