https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69043

            Bug ID: 69043
           Summary: Trying to include a directory causes an infinite loop
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jim.macarthur at codethink dot co.uk
  Target Milestone: ---

Created attachment 37128
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37128&action=edit
Reproduction test case.

Trying to include a directory, for example:

include '.'
include '/'

...causes the scanner to go into an infinite loop. Also reproduced on 4.8. I
have a fix for this which I'll send to the mailing list in due course.

Command line: gccinstall/bin/gfortran -Wall -Wextra
~/vanilla-gcc/gcc/gcc/testsuite/gfortran.dg/include_9.f

Output: None (goes into infinite loop immediately)

gfortran -v:
Using built-in specs.
COLLECT_GCC=gccinstall/bin/gfortran
COLLECT_LTO_WRAPPER=/home/jimmacarthur/vanilla-gcc/gccinstall/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure
--prefix=/home/jimmacarthur/vanilla-gcc/gccinstall --enable-languages=fortran :
(reconfigured) ../gcc/configure
--prefix=/home/jimmacarthur/vanilla-gcc/gccinstall --enable-languages=fortran :
(reconfigured) ../gcc/configure
--prefix=/home/jimmacarthur/vanilla-gcc/gccinstall --enable-languages=fortran
Thread model: posix
gcc version 6.0.0 20151224 (experimental) (GCC)

Reply via email to