soccer jersey forums.silverfrost.com :: View topic - Error reporting
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error reporting

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Tue May 16, 2023 7:50 am    Post subject: Error reporting Reply with quote

During last year FTN95 started to report numerous false positives. It can tell you that you made an error in the absolutely legit place confusing you. To start this behavior you just need to make any other error and you will get bunch of other not valid ones. Typically the bad place is also reported somewhere down the file 1000 lines below or so but today i just forgot () in declaration of function like this

integer function ReadInitialSettings ()

and got two non-existent errors in report and no actual error. This is scary. Some day you will get an error report and will not find actual error in days (ones or twice in my past career i searched for an error for entire month). The frequent backups and frequent compilations becomes a necessity

Do others noticed such behavior of FTN95 lately ?
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Wed May 17, 2023 3:01 pm    Post subject: Reply with quote

You should see fewer such "false error reports" if your sources are free form rather than the old F77 fixed form.

In fixed form, if you left out the '()' in the function declaration, the compiler could conclude that the declaration is
Code:
integer functionReadInitialSettings

In other words, that this is an integer variable declaration, and that this source line is starting a second main program unit.

To do anything about your rather general but vague complaint, it is probably necessary for you to collect and submit reproducers that are sufficient to make the compiler exhibit incorrect/implausible error messages.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Wed May 17, 2023 5:44 pm    Post subject: Reply with quote

The cases I was working with last year were free form sources.
One such case was fixed last year. Took me days to prepare a demo
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Fri Jun 02, 2023 10:14 pm    Post subject: Reply with quote

Is there anything wrong with these lines?
Code:
    IF(iTimesThisPlace1.GT.100.or.iTimesThisPlace2.gt.100) then
      if(iTimesThisPlace.ge.iTimesThisPlace2)  write(chNumbOutOfRange,'(i12)') iTimesThisPlace
      if(iTimesThisPlace.lt.iTimesThisPlace2)  write(chNumbOutOfRange,'(i12)') iTimesThisPlace2
      if(kAllowPOPtooManyParticl.eq.1)  CALL POP('Too many particles out of range='//chNumbOutOfRange//'. Switch ON checking')
    ENDIF


Definitely not. But i am getting the error report

Code:
17122) if(iTimesThisPlace.ge.iTimesThisPlace2)  write(chNumbOutOfRange,'(i12)') iTimesThisPlace
*** Error 420: The condition in an IF statement should be scalar


And that strange refusal to compile happens all the time since 1990 if the file reach 30-35k lines. I wrote about this few times here over these years. I was forced to split the file and all goes OK...This will be inconvenient ones again in the future because will need to introduce more modules and more modules etc.... Unbelievable no one else have seen that behavior.

Some integer*2 variable was forgotten in the compiler since 1980th?
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Sat Jun 03, 2023 12:57 am    Post subject: Reply with quote

Do you have explicit declarations for the variables iTimesThisPlace and iTimesThisPlace2? Are they scalars? Functions?

It is probably not a good idea to break up a source file into smaller files and thereby disable the compiler from spotting inconsistencies in type, usage, etc., for identifiers that appear in more than one program unit.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2863
Location: South Pole, Antarctica

PostPosted: Sat Jun 03, 2023 6:32 am    Post subject: Reply with quote

Yes, they are declared as integer*8 variables in main module used everywhere.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8011
Location: Salford, UK

PostPosted: Sat Jun 03, 2023 7:19 am    Post subject: Reply with quote

Dan

Please provide a working sample that illustrates this error report.

The following expansion does not produce an error.

Code:
    character*80 chNumbOutOfRange
    integer*8 iTimesThisPlace,iTimesThisPlace1,iTimesThisPlace2
    integer kAllowPOPtooManyParticl
    chNumbOutOfRange = ""
    iTimesThisPlace = 0
    iTimesThisPlace1 = 0
    iTimesThisPlace2 = 0
    kAllowPOPtooManyParticl = 0
    IF(iTimesThisPlace1.GT.100.or.iTimesThisPlace2.gt.100) then
      if(iTimesThisPlace.ge.iTimesThisPlace2)  write(chNumbOutOfRange,'(i12)') iTimesThisPlace
      if(iTimesThisPlace.lt.iTimesThisPlace2)  write(chNumbOutOfRange,'(i12)') iTimesThisPlace2
      if(kAllowPOPtooManyParticl.eq.1)  CALL POP('Too many particles out of range='//chNumbOutOfRange//'. Switch ON checking')
    ENDIF
    end
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2580
Location: Sydney

PostPosted: Sat Jun 03, 2023 1:12 pm    Post subject: Reply with quote

Dan,

The following example produces the error message.
Does your original code have a dimension statement somewhere ?
Code:
    character*80 chNumbOutOfRange
    integer*8 iTimesThisPlace,iTimesThisPlace1,iTimesThisPlace2
    dimension iTimesThisPlace(2)
    integer  kAllowPOPtooManyParticl

    chNumbOutOfRange = ""
    iTimesThisPlace  = 0
    iTimesThisPlace1 = 0
    iTimesThisPlace2 = 101
    kAllowPOPtooManyParticl = 1

    IF ( iTimesThisPlace1 > 100 .or.  &
         iTimesThisPlace2 > 100) then

      if ( iTimesThisPlace >= iTimesThisPlace2)  write(chNumbOutOfRange,'(i0)') iTimesThisPlace
      if ( iTimesThisPlace <  iTimesThisPlace2)  write(chNumbOutOfRange,'(i0)') iTimesThisPlace2
      if ( kAllowPOPtooManyParticl == 1)  CALL POP ('Too many particles out of range= ' // &
                                                    trim (chNumbOutOfRange) // &
                                                    '. Switch ON checking')
    END IF

    end
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group