Bug 163019

Summary: many preprocessor lines leads to error_char(): Error buffer overflow
Product: [Fedora] Fedora Reporter: Patrice Dumas <patpertusus>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-12 10:42:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
test case none

Description Patrice Dumas 2005-07-12 10:39:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.8) Gecko/20050623 Fedora/1.0.4-5 Firefox/1.0.4

Description of problem:
A simple program leads to  
 Internal Error at (1):
 error_char(): Error buffer overflow
however the program itself doesn't seems to be the culprit, but rather the preprocessor lines as when I remove a preprocessor line the compilation proceed, and there are many warnings that seems to be related with preprocessing.

Here is the code:
      SUBROUTINE SZREAD()
      integer luncz
      luncz = 0
      IF(LUNCZ.NE.0) WRITE(*,*) 'hello'
      END

I attach the file which also has the preprocessor lines

The whole output reads:

[dumas@chapelle bug_reports]$ gfortran -c szread.F -o truc.o
line-map.c: file "/home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/sz/szread.F" left but not entered
line-map.c: file "/home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/sz/szread.F" left but not entered
Warning: /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/zmachfix.inc:3: file /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/zmach.inc left but not entered
Warning: /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/zmachfix.inc:4: file /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/pilot.h left but not entered
Warning: /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/hcmail.inc:3: file /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czsock.inc left but not entered
Warning: /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czoptd.inc:4: file /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czopts.inc left but not entered
Warning: /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czoptu.inc:8: file /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czopts.inc left but not entered
 In file /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czoptu.inc:5

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czoptd.inc:6

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czopts.inc:4

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/hcmail.inc:5

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/czsock.inc:2

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/zmachfix.inc:6

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/zmach.inc:2

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/cspack/pilot.h:3

     Included at /home/dumas/rpmbuild/BUILD/cernlib-2005/2005/src/packlib/cspack/sz/szread.F:3

      IF(LUNCZ.NE.0) WRITE(*,*) 'hello'
             1
 Internal Error at (1):
 error_char(): Error buffer overflow
[dumas@chapelle bug_reports]$


Version-Release number of selected component (if applicable):
gcc-gfortran-4.0.1-2

How reproducible:
Always

Steps to Reproduce:
1.compile the attached file
2.
3.
  

Actual Results:  an error

Expected Results:  a compilation

Additional info:

I think that this was introduced with the latest gfortran version.

Comment 1 Patrice Dumas 2005-07-12 10:41:13 UTC
Created attachment 116643 [details]
test case

Comment 2 Jakub Jelinek 2005-07-12 10:42:28 UTC

*** This bug has been marked as a duplicate of 162969 ***