Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

invalid "&"

wen
Beginner
967 Views
On the following list of a program, the compiler gave me a warning message:

Testquot.f90(6) : Warning: Invalid use of & in quoted string.

Why?

The attached testQuot.f90 would get the same warning for Tests 5 to 13, beside Test 3.

Wen

program testQuot
write(*,"('Test1')")
write(*,"('Test2')" &
&)
write(*,"('Test3') &
&" &
&)
write(*,"('Test4') &
&")
end program testQuot

Wen
0 Kudos
7 Replies
Steven_L_Intel1
Employee
967 Views
At first glance, it would seem to be a bug. I'll pass this on to the developers.
0 Kudos
bgeneto
Beginner
967 Views
I think this problem was accidentally inserted with IFC 9.1.024 and is now solved for compiler version 9.1.025, at least for me your posted code compiles successfully. What IFC version are you using?
0 Kudos
Steven_L_Intel1
Employee
967 Views
Now that I try it, I agree - it compiles ok in 9.1.025.
0 Kudos
wen
Beginner
967 Views
I did use 9.1.024 because I was lazy to do the minor upgrade.

However, I just upgraded the compiler to 9.1.025, build 20060519Z, and it still gave me the same warning message when I use my procedure in compilation. Further tests reveal that it is fine if I use
ifort testquot.f90
but the warning messages appear when I run
ifort testquot.f90 /fpp

Wen
0 Kudos
Steven_L_Intel1
Employee
967 Views
Ok, I see that too, and will notify the developers. Is this a real program or just a torture test for compilers you devised?
0 Kudos
Steven_L_Intel1
Employee
967 Views
By the way, I note that the program compiles and runs successfully, despite the warnings.
0 Kudos
wen
Beginner
967 Views
Steve,

The symptom appeared in one of my application programs and made me wrote a simplified code to see how it happened.

Yes, it is just an annoying warning without affecting the program run. And I could easily change the code to avoid such a warning.

Thank you.

Wen
0 Kudos
Reply