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]

Re: Misleading error messages


Hi,

> clear enough - I was not sure whether reporting at bugzilla that was
> the preferred
> procedure or not. I have seen enough discussions about a problem first and then
> the recommendation to report it in bugzilla, that I thought that was
> the way to go.

for the 'official' GCC bug reporting instructions, cf.
http://gcc.gnu.org/bugs/ where it says:

"Where to post it
Please submit your bug report directly to the GCC bug database."

There you can also find further hints on how to do a good bug report.

My personal opinion is: As long as you are sure that it is a compiler
bug, please file it in bugzilla directly (that includes e.g.
everything which generates an "internal compiler error", which by
definition is always a bug). Only if you are unsure whether the
observed behavior is a bug or not (and you need feedback/discussion or
have an actual question), then post it to the mailing list.

Cheers,
Janus



> 2011/8/31 Janus Weil <janus@gcc.gnu.org>:
>> Hi Arjen,
>>
>> first off: Note that the default procedure for reporting a bug in
>> GCC/gfortran should be to submit a PR in bugzilla (that's what it's
>> for, after all), and not writing an email to the gfortran mailing list
>> (which is ok if you're not sure whether it really is a bug etc, but in
>> general you should really use bugzilla. It really does have a couple
>> of advantages.)
>>
>>
>>> the error messages that the gfortran compiler emits when compiling the
>>> program are slightly misleading:
>>
>> While I agree that one could improve them, I wouldn't go as far as to
>> call them 'misleading'. All the wording is completely correct, AFAICS.
>>
>>
>>
>>> strange_error_msg.f90:18.18:
>>>
>>> ? ?allocate ( b, src = x ) ! Should be: source =
>>> ? ? ? ? ? ? ? ? ?1
>>> Error: Allocate-object at (1) is not a nonprocedure pointer or an
>>> allocatable variable
>>
>> In my mail reader it comes out wrong, but in the console the "1"
>> actually appears at the right place. One could include the variable
>> name ('src') in the error message. Other ideas?
>>
>>
>>> strange_error_msg.f90:20.11:
>>>
>>> ? ?call bb%print
>>> ? ? ? ? ? 1
>>> Error: Syntax error in CALL statement at (1)
>>
>> Ok, this one could be a bit more precise, even if what is said is correct.
>>
>> Clearly your chances of getting it fixed will increase if you
>> 1) submit an actual PR in bugzilla and
>> 2) make a suggestion on how you would improve the message to make it more clear
>>
>> ;)
>>
>> Cheers,
>> Janus
>>
>>
>>
>>> -------
>>> ! strange_error_msg.f90 --
>>> ! ? ? The code causes the compiler to print misleading
>>> ! ? ? error messages
>>> !
>>> program strange_error_msg
>>>
>>> ? ?type base_type
>>> ? ? ? ?integer :: id
>>> ? ?end type base_type
>>>
>>> ? ?type, extends(base_type) :: data_type
>>> ? ? ? ?real :: value
>>> ? ?end type data_type
>>>
>>> ? ?type(data_type) ? ? ? ? ? ? ? :: x
>>> ? ?class(base_type), allocatable :: b
>>>
>>> ? ?allocate ( b, src = x ) ! Should be: source =
>>>
>>> ? ?call bb%print
>>>
>>> end program strange_error_msg
>>>
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]