public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: f951: internal compiler error // when compiling with preprocessing and an unavail include dir
       [not found] <16d6fa34-9314-448e-97ce-386698e5795f@HUB2.rwth-ad.de>
@ 2013-03-19  9:14 ` Tobias Burnus
  2014-02-04 17:10   ` Paul Kapinos
  2016-05-02 15:51   ` Paul Kapinos
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Burnus @ 2013-03-19  9:14 UTC (permalink / raw)
  To: Paul Kapinos; +Cc: fortran

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: f951: internal compiler error // when compiling with preprocessing and an unavail include dir
  2013-03-19  9:14 ` f951: internal compiler error // when compiling with preprocessing and an unavail include dir Tobias Burnus
@ 2014-02-04 17:10   ` Paul Kapinos
  2016-05-02 15:51   ` Paul Kapinos
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Kapinos @ 2014-02-04 17:10 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: fortran

[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]

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


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4533 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: f951: internal compiler error // when compiling with preprocessing and an unavail include dir
  2013-03-19  9:14 ` f951: internal compiler error // when compiling with preprocessing and an unavail include dir Tobias Burnus
  2014-02-04 17:10   ` Paul Kapinos
@ 2016-05-02 15:51   ` Paul Kapinos
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Kapinos @ 2016-05-02 15:51 UTC (permalink / raw)
  To: Tobias Burnus, Paul Kapinos; +Cc: fortran, Buesing, Henrik

[-- Attachment #1: Type: text/plain, Size: 4784 bytes --]

Dear Tobias,

did you remember about my report 3 years ago? see below or
https://gcc.gnu.org/ml/fortran/2013-03/msg00083.html

Well, the ICE is still here in /6.1.0 after 3 years..

Another issue:
'-Wno-missing-include-dirs' and '-Wmissing-include-dirs'  - see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534

so current behaviour is:

 > $ gfortran -I/no/such/dir -Wno-missing-include-dirs acumem_testprogramm.f90
 > f951: Warning: Nonexistent include directory '/no/such/dir'
 >     [-Wmissing-include-dirs]

which is rather puzzling, as on other side you cannot use 
'-Wno-missing-include-dirs' (it is not an gfortran option neither  described in 
the 'man gfortran') but in other side the warning tell about 
'-Wmissing-include-dirs' be active...

Maybe there is another way as '-Wno-missing-include-dirs' for fortran programs?

Best

Paul Kapinos


------------------------------------------------------------------------------
f951: Warning: Include directory './foo/bar': Permission denied
f951: internal compiler error: in cpp_diagnostic, at libcpp/errors.c:59
0x10d39b7 cpp_diagnostic
         ../../../SOURCES/gcc-6.1.0/libcpp/errors.c:59
0x10d3ae6 cpp_error(cpp_reader*, int, char const*, ...)
         ../../../SOURCES/gcc-6.1.0/libcpp/errors.c:76
0x8b7891 remove_duplicates
         ../../../SOURCES/gcc-6.1.0/gcc/incpath.c:258
0x8b7e3f merge_include_chains
         ../../../SOURCES/gcc-6.1.0/gcc/incpath.c:360
0x8b7e3f register_include_chains(cpp_reader*, char const*, char const*, char 
const*, int, int, int)
         ../../../SOURCES/gcc-6.1.0/gcc/incpath.c:486
0x5ddb55 gfc_cpp_register_include_paths()
         ../../../SOURCES/gcc-6.1.0/gcc/fortran/cpp.c:703
0x638da4 gfc_post_options(char const**)
         ../../../SOURCES/gcc-6.1.0/gcc/fortran/options.c:390
0x5c296b process_options
         ../../../SOURCES/gcc-6.1.0/gcc/toplev.c:1217
0x5c296b do_compile
         ../../../SOURCES/gcc-6.1.0/gcc/toplev.c:1942
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
------------------------------------------------------------------------------




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


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4891 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-02 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <16d6fa34-9314-448e-97ce-386698e5795f@HUB2.rwth-ad.de>
2013-03-19  9:14 ` f951: internal compiler error // when compiling with preprocessing and an unavail include dir Tobias Burnus
2014-02-04 17:10   ` Paul Kapinos
2016-05-02 15:51   ` Paul Kapinos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).