This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi there, First let me say that -Wuninitialized and -Wunused are really great tools. However (you guessed there was an issue, didn't you?) I would be grateful to anybody who can illuminate me on the following. I have a small sample attached, and it generates the output shown below. Two questions: 1. Why is the compiler warning about "ia.0" potentially uninitialized? At first sight, this seems to be related to the IA(:) variable, which is declared INOUT, so I don't understand why it should be initialized. Or is it about something else? Moreover, it looks like a case simple enough to figure out that IA is only used if present, so no need for "May be" (but maybe I am wrong?) 2. Why does the compiler complain about stride.1 and ubound.0 which are not visible to the user? I figure they are variables internal to the descriptors for allocatable arrays, they should be reported under the array variable name... While not strictly bugs (I think), they can be confusing, especially if applied to large codes.... Thanks Salvatore --------------------------output------------- [sfilippo@localhost TEMP]$ gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc/configure --enable-languages=c,c++,fortran,objc --prefix=/usr/local/gcc42 Thread model: posix gcc version 4.2.0 20060719 (experimental) [sfilippo@localhost TEMP]$ gfortran -O -c -Wuninitialized tmp.f90 tmp.f90: In function 'outer': tmp.f90:2: warning: 'stride.1' may be used uninitialized in this function tmp.f90:2: warning: 'ubound.0' may be used uninitialized in this function tmp.f90:2: warning: 'ia.0' may be used uninitialized in this function
Attachment:
tmp.f90
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |