- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This one's got me stumped. Thanks for the help.
In this F90 code, why do I get an "no source code available" error at 'ch = bk' for:
gac
In this F90 code, why do I get an "no source code available" error at 'ch = bk' for:
[fortran] program main character :: bk = "z"
character :: ch ch = bk print*, 'ch: ', ch stop end[/fortran]
but this works fine:
[fortran] program main character, parameter :: bk = "z" character :: ch ch = bk print*, 'ch: ', ch stop end [/fortran]
I get the same error for this:
[fortran] program main character :: bk character :: ch bk = "z" ch = "x" ch = bk print*, 'ch: ', ch stop end [/fortran]Thanks.
gac
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried your first program and saw no problems. Which exact compiler version are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
I'm running Professional 11.1 from MS Visual Studio 2008.
gac
I'm running Professional 11.1 from MS Visual Studio 2008.
gac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've discovered that I only get the "no source code" error if I set a breakpoint at the 'ch = bk' statement and, then, "stepinto" it with f11.
If I allow the code to run through the statement without a breakpoint, I don't get the error.
With the 'parameter' form of the declaration, I don't get the error whether a breakpoint is set or not.
Very odd.
Thanks.
gac
If I allow the code to run through the statement without a breakpoint, I don't get the error.
With the 'parameter' form of the declaration, I don't get the error whether a breakpoint is set or not.
Very odd.
Thanks.
gac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the clarification, though when I asked for the exact version, I meant like 11.1.060.
In any event, what you are doing is stepping into the "memcpy" routine that is called when the source is a variable. (Under optimization, this would be removed.) There's no source for that so you get the message. You should use "step over" instead, unless you know you want to step into one of your routines. Even then, it's possible that some library routines may be called before your routine is called.
With the PARAMETER version, no memcpy routine is called, even with optimization disabled, so there's nothing being stepped into.
In any event, what you are doing is stepping into the "memcpy" routine that is called when the source is a variable. (Under optimization, this would be removed.) There's no source for that so you get the message. You should use "step over" instead, unless you know you want to step into one of your routines. Even then, it's possible that some library routines may be called before your routine is called.
With the PARAMETER version, no memcpy routine is called, even with optimization disabled, so there's nothing being stepped into.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much.
How do I find the version? I can get thebuildby running ifort.
How do I find the version? I can get thebuildby running ifort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you're using the command line, the ifort command will give it to you by default. For example:
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20100203 Package ID: w_cprof_p_11.1.060
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
In Visual Studio, Tools > Options > Intel Visual Fortran > Compilers and see what the "Selected Compiler" is.
Intel Visual Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20100203 Package ID: w_cprof_p_11.1.060
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
In Visual Studio, Tools > Options > Intel Visual Fortran > Compilers and see what the "Selected Compiler" is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.1 Package ID: w_cprof_p_11.1.035
Intel Visual Fortran Compiler Professional for applications running on IA-32, Version 11.1 Package ID: w_cprof_p_11.1.035
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. While it's not relevant to the issue you have here (this is not a compiler bug), I do recommend that you keep current with the compiler.

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