From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 003EF3851C3B; Sun, 13 Sep 2020 08:02:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 003EF3851C3B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1599984122; bh=swQJeJ5FfpoKkyF+41n6YKItomV4kJiOtcRiTkjlZRg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C+8ccumTNZuF3bdJ+Fd9mPpcCF+zURUf3+KSgfcXnVgQRCbbBradKEXrWGanCk6lx ZydDtcPJIbYLnVrJl0LwvqKKwU4GwQyj7idsc7214HIJdIoXsnBtp/slzVaWmK7cOX YZ7xXwrAkyAZpxVMidTvby4YvCTBsGPTqevVSFnA= From: "jean-pierre.flament@univ-lille.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/97031] the content of a comment line breaks compilation Date: Sun, 13 Sep 2020 08:02:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.4.7 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jean-pierre.flament@univ-lille.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2020 08:02:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97031 --- Comment #2 from jean-pierre.flament@univ-lille.fr --- Thanks,=20 However, if I launch "man cpp" or "man gfortran" I can't see anything in relation with my problem and traditional. I just noticed that cpp recognizes the extensions .fpp .F and other upperca= se extensions.=20 This is why I added -cpp in the gfortran command (otherwise I have a diagno= stic because of #ifdef's I have renamed my file with the .fpp extension; with "-cpp" in the gfortr= an submission I get the same errors. If I compile the file with extension *.f or .fpp without -cpp=20=20 1) the compilation has no error=20 2) a #ifdef...#endif is recognized even with a .f extension, without -cpp,= in my simple example, (I should check that the directive really is taken into account !)=20 3) IF I compile my full project in a makefile, the absence of "-cpp" in the gfortran command induces=20 a "Illegal preprocessor directive" error in all the routines having tha= t=20 #ifdef...#endif ----- Mail original ----- De: "kargl at gcc dot gnu.org" =C3=80: "jean-pierre flament" Envoy=C3=A9: Samedi 12 Septembre 2020 12:14:06 Objet: [Bug fortran/97031] the content of a comment line breaks compilation https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97031 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- (In reply to jean-pierre.flament from comment #0) > Created attachment 49211 [details] > contains fortran pgm, system and compile info and output >=20 > I would like to signal to you a compilation problem that I have solved. >=20 > the following comment line >=20 > ! some text... DIR/*/) >=20 > seems to put the compiler into trouble. (see attachment) >=20 > changing the line to=20 >=20 > ! some text... DIR/d2) >=20 > solves the problem >=20 > The attached file contains=20 >=20 > 1) the fortran (self contained)=20=20 > The faulty line is marked =3D=3D> FAULTY LINE, > it is followed by the line =3D=3D=3D> LINE OK > 2) the system name (centos 6.10) and kernel > 3) the command to compile > 4) the output >=20 > all these parts are sepaated by =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D lines >=20 > I have also tested gfortran 6.3 (from devtoolset of centos) on the same > computer (As far as I remember the errors are different but the compilati= on > fails), and gfortran 4.9.3 also on a centos machine: same as 4.4.7). > Sorry I have not access to newer versions of gfortran This should be closed as INVALID. You are preprocessing your code with cpp in traditional mode, and therefore the '/*' in your code is the start of a C comment. This is an user error. Not a problem with gfortran.=