f951: internal compiler error // when compiling with preprocessing and an unavail include dir

Paul Kapinos kapinos@rz.rwth-aachen.de
Tue Feb 4 17:10:00 GMT 2014


Hello Tobias,
I kindly wanna remember you of this bug. In fresh-installed 4.8.2 (last release) 
of 'gfortran' this problem ist still there... Never reported into Bugzilla?

Best
Paul

On 03/19/13 09:57, Tobias Burnus wrote:
> Hello Paul,
>
> Paul Kapinos wrote:
>> f951: internal compiler error: Aborted
>>
>> The issue is aligned on using both the preprocessing (indicated by F90 instead
>> of f90) and access to an directory which exists but is not permitted to read.
>
> I could reproduce it with GCC 4.8. With the C compiler (i.e. cc1), the error is
> detected:
>
>
> Breakpoint 1, remove_duplicates (pfile=pfile@entry=0x1618cb0, head=0x1623070,
> system=0x1623190, join=0x1623190, verbose=verbose@entry=1) at
> ../../gcc/incpath.c:246
> 246     {
> (gdb) n
> 250       for (pcur = &head; *pcur; )
> (gdb)
> 246     {
> (gdb)
> 250       for (pcur = &head; *pcur; )
> (gdb)
> 256           if (stat (cur->name, &st))
> (gdb)
> 259               if (errno != ENOENT)
> (gdb)
> 260                 cpp_errno (pfile, CPP_DL_ERROR, cur->name);
> (gdb)
> cc1: error: foo/bar: Permission denied
>
> * * *
>
> I am a bit surprised that GCC 4.8/4.9's gfortran also has this problem, given
> that add_path_to_list contains a similar code:
>
>    if (stat (q, &st))
>      {
>        if (errno != ENOENT)
>          gfc_warning_now ("Include directory \"%s\": %s", path,
>                           xstrerror(errno));
> ...
>        return;
>      }
>
> gfortran: error: mini.F90: No such file or directory
>
>
> But this error seems to come from the driver (gfortran) and not from the the
> compiler itself (f951).
>
> * * *
>
> On the other hand, also with gfortran (or rather f951), one calls:
> gfc_cpp_register_include_paths -> register_include_chains ->
> merge_include_chains -> remove_duplicates.
>
> Indeed, the problem is not the nonexisting directory, but that
>    pfile->cb.error == NULL
> cb.error is a function pointer with the prototype:
>    bool (*)(cpp_reader *, int, int, source_location, unsigned int, const char *,
> va_list *)
>
> In case of C/C++, that's declared at c-family/c-common.c and used in c-opts.c:
> "cb->error = c_cpp_error;". Seems as if such a function is missing.
>
>
> I will fill a bug report as soon as the web server is working again. (There is a
> big server hardware+OS update ongoing, which started yesterday. It seems as if
> nearly everything is working, except of the webserver + Bugzilla.)
>
> Tobias
>
>


-- 
Dipl.-Inform. Paul Kapinos   -   High Performance Computing,
RWTH Aachen University, IT Center
Seffenter Weg 23,  D 52074  Aachen (Germany)
Tel: +49 241/80-24915

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4533 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140204/2acd9a0e/attachment.p7s>


More information about the Fortran mailing list