public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Kapinos <kapinos@itc.rwth-aachen.de>
To: Tobias Burnus <burnus@net-b.de>,
	Paul Kapinos <kapinos@rz.rwth-aachen.de>
Cc: <fortran@gcc.gnu.org>,
	"Buesing, Henrik" <HBuesing@eonerc.rwth-aachen.de>
Subject: Re: f951: internal compiler error // when compiling with preprocessing and an unavail include dir
Date: Mon, 02 May 2016 15:51:00 -0000	[thread overview]
Message-ID: <57277756.3090800@itc.rwth-aachen.de> (raw)
In-Reply-To: <5148287E.6010304@net-b.de>

[-- 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 --]

      parent reply	other threads:[~2016-05-02 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57277756.3090800@itc.rwth-aachen.de \
    --to=kapinos@itc.rwth-aachen.de \
    --cc=HBuesing@eonerc.rwth-aachen.de \
    --cc=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=kapinos@rz.rwth-aachen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).