[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-10-04 Thread fxcoudert at gcc dot gnu dot org


--- Comment #8 from fxcoudert at gcc dot gnu dot org  2007-10-04 15:04 
---
Subject: Bug 33502

Author: fxcoudert
Date: Thu Oct  4 15:04:09 2007
New Revision: 129011

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129011
Log:
PR fortran/33502
* scanner.c (gfc_advance_line): Call debug_hooks-end_source_file
and debug_hooks-start_source_file when appropriate, and set
dbg_emitted.
(gfc_define_undef_line): New function.
(load_file): Don't error out on #define and #undef lines.
* parse.c (next_statement): Call gfc_define_undef_line.
(gfc_parse_file): Call debug_hooks-start_source_file and
debug_hooks-end_source_file for the main source file if
required.
* gfortran.h (gfc_linebuf): Add dbg_emitted field.
(gfc_define_undef_line): New prototype.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/scanner.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-10-04 Thread fxcoudert at gcc dot gnu dot org


--- Comment #9 from fxcoudert at gcc dot gnu dot org  2007-10-04 15:05 
---
Fixed on mainline. Thanks for the bug report!


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-30 Thread fxcoudert at gcc dot gnu dot org


--- Comment #7 from fxcoudert at gcc dot gnu dot org  2007-10-01 00:05 
---
Created an attachment (id=14276)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14276action=view)
Updated patch

The attached updated patch seems to fix the issue (and also fixes a problem in
the logic and yet another unrelated problem; I'll explain in my submission
mail). This is currently regtesting with different debug formats.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-24 Thread fxcoudert at gcc dot gnu dot org


--- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-09-24 20:28 
---
It would be nice to find a patch that doesn't break bootstrap on plenty of
platforms :)

I'll be on it when I have time, PR 33538 indicates the trouble caused by my
first patch, now reverted.


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-22 Thread fxcoudert at gcc dot gnu dot org


--- Comment #4 from fxcoudert at gcc dot gnu dot org  2007-09-22 15:03 
---
Subject: Bug 33502

Author: fxcoudert
Date: Sat Sep 22 15:03:24 2007
New Revision: 128671

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=128671
Log:
PR fortran/33502
* scanner.c (gfc_advance_line): Call debug_hooks-start_source_file
and debug_hooks-end_source_file when entering and exiting
included files.
(gfc_define_undef_line): New function.
(load_file): Ignore #define and #undef preprocessor lines
while reading source files.
* parse.c (next_statement): Handle #define and #undef
preprocessor lines.
(gfc_parse_file): Call debug_hooks-start_source_file and
debug_hooks-end_source_file for the main source file if
requested by the debug format.
* gfortran.h (gfc_define_undef_line): Add prototype.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/scanner.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-22 Thread fxcoudert at gcc dot gnu dot org


--- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-09-22 15:04 
---
Fixed.


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-20 Thread fxcoudert at gcc dot gnu dot org


--- Comment #2 from fxcoudert at gcc dot gnu dot org  2007-09-20 08:07 
---
Confirmed. Andrew, what is the front-end expected to do with the #defines? I
suspect that we need to pass them to the middle-end, by calling
debug_hooks-define and debug_hooks-undef (as is done in c-lex.c).


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||rejects-valid
   Last reconfirmed|-00-00 00:00:00 |2007-09-20 08:08:00
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-20 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2007-09-20 09:19 ---
Subject: Re:  gfortran with .F suffix and -g3 option chokes on preprocessor
syntax

On 20 Sep 2007 08:08:00 -, fxcoudert at gcc dot gnu dot org
[EMAIL PROTECTED] wrote:


 --- Comment #2 from fxcoudert at gcc dot gnu dot org  2007-09-20 08:07 
 ---
 Confirmed. Andrew, what is the front-end expected to do with the #defines? I
 suspect that we need to pass them to the middle-end, by calling
 debug_hooks-define and debug_hooks-undef (as is done in c-lex.c).


Yes that should be enough.

Thanks,
Andrew Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-20 Thread fxcoudert at gcc dot gnu dot org


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
  Known to fail||4.3.0 4.2.1 4.1.3
   Last reconfirmed|2007-09-20 08:08:00 |2007-09-20 09:34:21
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502



[Bug fortran/33502] gfortran with .F suffix and -g3 option chokes on preprocessor syntax

2007-09-19 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-09-19 18:58 ---
#define have to be understood by the front-end with -g3


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33502