public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0
@ 2015-06-19 19:11 kyle.niemeyer at gmail dot com
  2015-06-19 19:25 ` [Bug fortran/66605] " kyle.niemeyer at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: kyle.niemeyer at gmail dot com @ 2015-06-19 19:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66605
           Summary: -Wunused-parameter causes internal compiler error with
                    gfortran 5.1.0
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kyle.niemeyer at gmail dot com
  Target Milestone: ---

This small module causes an ICE in gfortran 5.1.0, when compiled with the
-Wunused-parameter flag:

MODULE test
        IMPLICIT NONE
        INTEGER, PARAMETER :: wp = KIND(1.0D0)
CONTAINS
SUBROUTINE sub (neq, time, y, dydt)
        IMPLICIT NONE    
    INTEGER :: neq
        REAL(WP) :: time, y(neq), dydt(neq)

        dydt(1) = 1.0 / y(1)
END SUBROUTINE sub
END MODULE

Here are the results from "gfortran -v -save-temps -Wunused-parameter -c
test.f90":

Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-apple-darwin14.3.0
Configured with: ../configure --build=x86_64-apple-darwin14.3.0
--prefix=/usr/local/Cellar/gcc/5.1.0
--libdir=/usr/local/Cellar/gcc/5.1.0/lib/gcc/5
--enable-languages=c,c++,objc,obj-c++,fortran,java,jit --program-suffix=-5
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking
--enable-checking=release --enable-lto --with-build-config=bootstrap-debug
--disable-werror --with-pkgversion='Homebrew gcc 5.1.0 --with-all-languages
--without-multilib' --with-bugurl=https://github.com/Homebrew/homebrew/issues
--enable-plugin --disable-nls
--with-ecj-jar=/usr/local/opt/ecj/share/java/ecj.jar --disable-multilib
--enable-host-shared
Thread model: posix
gcc version 5.1.0 (Homebrew gcc 5.1.0 --with-all-languages --without-multilib) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.10.3' '-v' '-save-temps'
'-Wunused-parameter' '-c' '-mtune=core2'
 /usr/local/Cellar/gcc/5.1.0/libexec/gcc/x86_64-apple-darwin14.3.0/5.1.0/f951
test.f90 -fPIC -quiet -dumpbase test.f90 -mmacosx-version-min=10.10.3
-mtune=core2 -auxbase test -Wunused-parameter -version -fintrinsic-modules-path
/usr/local/Cellar/gcc/5.1.0/lib/gcc/5/gcc/x86_64-apple-darwin14.3.0/5.1.0/finclude
-o test.s
GNU Fortran (Homebrew gcc 5.1.0 --with-all-languages --without-multilib)
version 5.1.0 (x86_64-apple-darwin14.3.0)
        compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (Homebrew gcc 5.1.0 --with-all-languages --without-multilib)
version 5.1.0 (x86_64-apple-darwin14.3.0)
        compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
'
test.f90:18:0:

 END SUBROUTINE sub
 1
in pp_format, at pretty-print.c:614

Internal compiler error: Error reporting routines re-entered.
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
@ 2015-06-19 19:25 ` kyle.niemeyer at gmail dot com
  2015-06-20 16:50 ` manu at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kyle.niemeyer at gmail dot com @ 2015-06-19 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Kyle <kyle.niemeyer at gmail dot com> ---
I should note that removing "-Wunused-parameter" allows compilation without
error.


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
  2015-06-19 19:25 ` [Bug fortran/66605] " kyle.niemeyer at gmail dot com
@ 2015-06-20 16:50 ` manu at gcc dot gnu.org
  2015-06-24 18:48 ` manu at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-20 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-20
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
The problem is that 
0x6b9191 gfc_generate_function_code(gfc_namespace*)
        /home/manuel/test1/pristine/gcc/fortran/trans-decl.c:6021

invokes code that may generate warnings from the middle-end (like
-Wunused-parameter), however, gfc_diagnostics_finish has not been called yet.

I don't know the Fortran FE well enough to decide whether
gfc_diagnostics_finish should be called earlier (or are fortran diagnostics
expected after this point?), or we should special case this call by using
something like:

Index: error.c
===================================================================
--- error.c     (revision 224467)
+++ error.c     (working copy)
@@ -1461,21 +1461,27 @@ gfc_errors_to_warnings (bool f)
 {
   warnings_not_errors = f;
 }

 void
-gfc_diagnostics_init (void)
+gfc_diagnostics_defaults (void)
 {
   diagnostic_starter (global_dc) = gfc_diagnostic_starter;
   diagnostic_finalizer (global_dc) = gfc_diagnostic_finalizer;
   diagnostic_format_decoder (global_dc) = gfc_format_decoder;
   global_dc->caret_chars[0] = '1';
   global_dc->caret_chars[1] = '2';
+}
+
+void
+gfc_diagnostics_init (void)
+{
   pp_warning_buffer = new (XNEW (output_buffer)) output_buffer ();
   pp_warning_buffer->flush_p = false;
   pp_error_buffer = &(error_buffer.buffer);
   pp_error_buffer->flush_p = false;
+  gfc_diagnostics_defaults ();
 }

 void
 gfc_diagnostics_finish (void)
 {
Index: trans-decl.c
===================================================================
--- trans-decl.c        (revision 224467)
+++ trans-decl.c        (working copy)
@@ -6016,11 +6016,15 @@ gfc_generate_function_code (gfc_namespac
         the cgraph node for this function.  */
       if (!has_coarray_vars || flag_coarray != GFC_FCOARRAY_LIB)
        (void) cgraph_node::create (fndecl);
     }
   else
-    cgraph_node::finalize_function (fndecl, true);
+    {
+      gfc_diagnostics_finish ();
+      cgraph_node::finalize_function (fndecl, true);
+      gfc_diagnostics_defaults ();
+    }

   gfc_trans_use_stmts (ns);
   gfc_traverse_ns (ns, gfc_emit_parameter_debug_info);

   if (sym->attr.is_main_program)
>From gcc-bugs-return-489498-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jun 20 17:35:20 2015
Return-Path: <gcc-bugs-return-489498-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 39709 invoked by alias); 20 Jun 2015 17:35:19 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 39672 invoked by uid 48); 20 Jun 2015 17:35:15 -0000
From: "tps@vr-web.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug web/66104] svn co https://gcc.gnu.org/svn/gcc/branches/gcc-5-branch/
Date: Sat, 20 Jun 2015 17:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: web
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tps@vr-web.de
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: <bug-66104-4-l33Aiey5gf@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66104-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66104-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg01830.txt.bz2
Content-length: 1351

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf104

--- Comment #5 from Thomas Schweikle <tps@vr-web.de> ---
Looks like you are using subversion 1.6.11 (r934486) for your server. The error
is known. An upgrade would solve it.

https://mail-archives.apache.org/mod_mbox/subversion-users/201307.mbox/%3C503643E3CDB1B140A24214C3484DCE8C01689F14@hwde-muc-ma-1.de.hyperwave.com%3E

The server seems to respond with an incomplete XML document structure. Closing
tags may be missing or not nested correctly:

Missing:
<tag>
something
EOD

Incorrect nesting:
<tag_1>
<tag_2>
</tag_1>
</tag_2>

Clients choke on these. In our case: the server isn't closing an open tag. Some
clients respond with the error I gave. Some tell "Connection timed out" waiting
on the closing tag.
To successfully checkout sources we would have to find a client not choking on
such malformed XML-Documents. I'am sure there are some around, but not at most
halfway up to date distros. And it wouldn't make sense to install an old quite
outdated subversion client if the recommended server version ist 1.8.13, the
older supported version is 1.7.20 and your servers version ist at outdated
unsupported 1.6.11 if the subverrsion website is correct:
https://subversion.apache.org/download/
I think you might be best of upgrading your server to the latest available,
recommended version.


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
  2015-06-19 19:25 ` [Bug fortran/66605] " kyle.niemeyer at gmail dot com
  2015-06-20 16:50 ` manu at gcc dot gnu.org
@ 2015-06-24 18:48 ` manu at gcc dot gnu.org
  2015-06-24 19:00 ` dominiq at lps dot ens.fr
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-24 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
BTW, is the resulting warning actually correct?
>From gcc-bugs-return-490095-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 18:52:58 2015
Return-Path: <gcc-bugs-return-490095-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 48647 invoked by alias); 24 Jun 2015 18:52:58 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 48579 invoked by uid 48); 24 Jun 2015 18:52:53 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
Date: Wed, 24 Jun 2015 18:52:00 -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: 5.1.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: <bug-66605-4-tVZWbY9IVs@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66605-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66605-4@http.gcc.gnu.org/bugzilla/>
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-SW-Source: 2015-06/txt/msg02427.txt.bz2
Content-length: 406

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

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This is the warning we get when "fixed":

/home/manuel/test3/src/gcc/testsuite/gfortran.dg/wunused-parameter.f90:8:0:

 SUBROUTINE sub (neq, time, y, dydt)
^
Warning: unused parameter ‘time’ [-Wunused-parameter]

There is no such warning with 4.3.1
>From gcc-bugs-return-490096-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 18:55:58 2015
Return-Path: <gcc-bugs-return-490096-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 50705 invoked by alias); 24 Jun 2015 18:55:58 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 50662 invoked by uid 48); 24 Jun 2015 18:55:52 -0000
From: "db0451 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66617] C++11 {brace} initialisation of virtually inherited derived class = failure to override base virtual function, unless all base ctors have same signature
Date: Wed, 24 Jun 2015 18:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: easyhack, rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: db0451 at gmail dot com
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: <bug-66617-4-RaRscRmwBN@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66617-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66617-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02428.txt.bz2
Content-length: 4323

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf617

--- Comment #4 from DB <db0451 at gmail dot com> ---
Attaching verbose output and tempfiles as recommended by bug reporting guide.




$ gcc -v -save-temps -std=c++11 virtual2.cpp -o virtual2.exe
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-4.9.2/configure --prefix=/mingw64
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include
--libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/4.9.2
--enable-bootstrap --with-arch=x86-64 --with-tune=generic
--enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared
--enable-static --enable-libatomic --enable-threads=posix --enable-graphite
--enable-fully-dynamic-string --enable-libstdcxx-time=yes
--disable-libstdcxx-pch --disable-libstdcxx-debug --enable-cloog-backend=isl
--enable-version-specific-runtime-libs --disable-cloog-version-check
--disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib
--enable-checking=release --disable-rpath --disable-win32-registry
--disable-nls --disable-werror --disable-symvers --with-libiconv
--with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64
--with-isl=/mingw64 --with-cloog=/mingw64 --with-pkgversion='Rev5, Built by
MSYS2 project' --with-bugurl=http://sourceforge.net/projects/msys2
--with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 4.9.2 (Rev5, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-o' 'virtual2.exe'
'-mtune=generic' '-march=x86-64'
 C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/cc1plus.exe -E -quiet -v
-D_REENTRANT virtual2.cpp -mtune=generic -march=x86-64 -std=c++11
-fpch-preprocess -o virtual2.ii
ignoring nonexistent directory "/mingw64/include"
ignoring duplicate directory "C:/msys64/mingw64/x86_64-w64-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/msys64/mingw64/include/c++/4.9.2
 C:/msys64/mingw64/include/c++/4.9.2/x86_64-w64-mingw32
 C:/msys64/mingw64/include/c++/4.9.2/backward
 C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/include
 C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../include
 C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/include-fixed

C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-o' 'virtual2.exe'
'-mtune=generic' '-march=x86-64'
 C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/4.9.2/cc1plus.exe -fpreprocessed
virtual2.ii -quiet -dumpbase virtual2.cpp -mtune=generic -march=x86-64 -auxbase
virtual2 -std=c++11 -version -o virtual2.s
GNU C++ (Rev5, Built by MSYS2 project) version 4.9.2 (x86_64-w64-mingw32)
        compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand\x100 --param ggc-min-heapsize\x131072
GNU C++ (Rev5, Built by MSYS2 project) version 4.9.2 (x86_64-w64-mingw32)
        compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand\x100 --param ggc-min-heapsize\x131072
Compiler executable checksum: 31108f4eb997d1c5310b0f90916e0ed9
virtual2.cpp: In constructor 'Right_Bottom::Right_Bottom(int, int, int, int)':
virtual2.cpp:51:6: error: cannot allocate an object of abstract type
'Left_Bottom'
   d{d}
      ^
virtual2.cpp:20:8: note:   because the following virtual functions are pure
within 'Left_Bottom':
 struct Left_Bottom: public virtual Left_Top
        ^
virtual2.cpp:12:15: note:       virtual void Left_Top::pure_virtual() const
  virtual void pure_virtual() const = 0;
               ^
virtual2.cpp:51:6: error: cannot allocate an object of abstract type
'Right_Top'
   d{d}
      ^
virtual2.cpp:31:8: note:   because the following virtual functions are pure
within 'Right_Top':
 struct Right_Top: public virtual Left_Top
        ^
virtual2.cpp:12:15: note:       virtual void Left_Top::pure_virtual() const
  virtual void pure_virtual() const = 0;
               ^


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (2 preceding siblings ...)
  2015-06-24 18:48 ` manu at gcc dot gnu.org
@ 2015-06-24 19:00 ` dominiq at lps dot ens.fr
  2015-06-24 19:16 ` manu at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-06-24 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> BTW, is the resulting warning actually correct?

According the gfortran manual

-Wunused-parameter
Contrary to gcc's meaning of -Wunused-parameter, gfortran's implementation of
this option does not warn about unused dummy arguments (see
-Wunused-dummy-argument), but about unused PARAMETER values. -Wunused-parameter
is implied by -Wextra if also -Wunused or -Wall is used. 

If I understand correctly the above statement, -Wunused-parameter should not
emit a warning for the test in comment 0: there is no parameter. The warning
should be issued with -Wunused-dummy-argument

pr66605.f90:5:25:

 SUBROUTINE sub (neq, time, y, dydt)
                         1
Warning: Unused dummy argument 'time' at (1) [-Wunused-dummy-argument]


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (3 preceding siblings ...)
  2015-06-24 19:00 ` dominiq at lps dot ens.fr
@ 2015-06-24 19:16 ` manu at gcc dot gnu.org
  2015-06-24 19:38 ` dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-24 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Another alternative is to add support for printing %D to gfc_format_decoder, it
is a matter of adding something like:

case 'D':
if (DECL_NAME (t))
{
          pp_string (pp, lang_hooks.decl_printable_name (t, 2));
          return true;
}
>From gcc-bugs-return-490102-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 19:25:04 2015
Return-Path: <gcc-bugs-return-490102-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 94036 invoked by alias); 24 Jun 2015 19:25:04 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 93631 invoked by uid 48); 24 Jun 2015 19:24:58 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
Date: Wed, 24 Jun 2015 19:25:00 -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: 5.1.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: <bug-66605-4-ZxOZr7RE1J@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66605-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66605-4@http.gcc.gnu.org/bugzilla/>
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-SW-Source: 2015-06/txt/msg02434.txt.bz2
Content-length: 1031

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

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #5)
> If I understand correctly the above statement, -Wunused-parameter should not
> emit a warning for the test in comment 0: there is no parameter. The warning
> should be issued with -Wunused-dummy-argument

If so, then the ICE was not caused by my diagnostic changes, it just exposes a
problem that has been latent or introduced later. Thus, I'm not planning to
investigate further.

If it is possible to generate a valid warning that triggers the same ICE, then
we should consider one of the options I have proposed above. From your
explanation above, it seems likely that Fortran doesn't ever want to get the
middle-end warning (which makes me wonder why this warning is given in the
middle-end to begin with!). Thus another (ugly?) fix may be to disable the
warning (all warnings?) completely around calls to finalize_function.
>From gcc-bugs-return-490103-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 19:27:09 2015
Return-Path: <gcc-bugs-return-490103-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 95492 invoked by alias); 24 Jun 2015 19:27:08 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 95464 invoked by uid 48); 24 Jun 2015 19:27:05 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66654] [6 Regression] ice in digest_init_r, at cp/typeck2.c:1103
Date: Wed, 24 Jun 2015 19:27:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: bug_status cf_reconfirmed_on cc short_desc everconfirmed
Message-ID: <bug-66654-4-24dh8YGnbk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66654-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66654-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02435.txt.bz2
Content-length: 809

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf654

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-24
                 CC|                            |trippels at gcc dot gnu.org
            Summary|ice in digest_init_r, at    |[6 Regression] ice in
                   |cp/typeck2.c:1103           |digest_init_r, at
                   |                            |cp/typeck2.c:1103
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
class A {
  A();
};
class B {
  A r{r};
};


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (4 preceding siblings ...)
  2015-06-24 19:16 ` manu at gcc dot gnu.org
@ 2015-06-24 19:38 ` dominiq at lps dot ens.fr
  2015-06-24 20:37 ` manu at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-06-24 19:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> If so, then the ICE was not caused by my diagnostic changes, it just exposes a
> problem that has been latent or introduced later. Thus, I'm not planning to
> investigate further.

Well, I think that is caused by your diagnostic changes, but is due to a
conflicting definition of -Wunused-parameter in C* and gfortran which now share
the same code (?).

I am not sure if it is too late or not to change the name of the option in one
of the front end. If it is too late, is it possible for the fortran FE to
rename internally the option before passing it to the ME?


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (5 preceding siblings ...)
  2015-06-24 19:38 ` dominiq at lps dot ens.fr
@ 2015-06-24 20:37 ` manu at gcc dot gnu.org
  2015-06-24 20:42 ` manu at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-24 20:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #8)
> > If so, then the ICE was not caused by my diagnostic changes, it just exposes a
> > problem that has been latent or introduced later. Thus, I'm not planning to
> > investigate further.
> 
> Well, I think that is caused by your diagnostic changes, but is due to a
> conflicting definition of -Wunused-parameter in C* and gfortran which now
> share the same code (?).

It could be when we changed Fortran options to use the common options
machinery. But that sounds strange anyway, because -Wunused-parameter would
have enabled the middle-end warning in any case. I cannot find any code that
disabled the warning before my changes. In fact, this same testcase in GCC
4.5.1 (way before my changes!) had the middle-end option enabled but it didn't
give any warning.

> I am not sure if it is too late or not to change the name of the option in
> one of the front end. If it is too late, is it possible for the fortran FE
> to rename internally the option before passing it to the ME?

It could simply set:

{
 int tmp_warn_unused_parameter = warn_unused_parameter;
 warn_unused_parameter = 0
 cgraph_node::finalize_function (fndecl, true);
 warn_unused_parameter= tmp_warn_unused_parameter;
}

But it seems quite ugly to me. It would be better to understand why the
middle-end thinks it is unused (perhaps Fortran needs to mark it as used or
mark it with TREE_NO_WARNING?).

In fact, the exact same code in GCC 4.5.1 has TREE_NO_WARNING set in the
PARAM_DECL corresponding to time, but I'm not sure where it is set.

The middle-end warning also shows that the location given by Fortran to the
PARAM_DECL is very poor.

I still think this is a latent bug in the way that Fortran is generating the
PARAM_DECL for time, but if the Fortran maintainers are not interested in
investigating that, then I could prepare a patch with any of the work-arounds I
have proposed above as soon as a Fortran maintainer (someone that will approve
the patch) chooses one.
>From gcc-bugs-return-490126-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 20:38:53 2015
Return-Path: <gcc-bugs-return-490126-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 65615 invoked by alias); 24 Jun 2015 20:38:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 65583 invoked by uid 48); 24 Jun 2015 20:38:49 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/66657] Feature request - assembly output from lto compiler
Date: Wed, 24 Jun 2015 20:38:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: driver
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia at gcc dot gnu.org
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: <bug-66657-4-7cAg0pPDeu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66657-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66657-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02458.txt.bz2
Content-length: 180

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf657

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What are you trying to do with the assembly after the fact?


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (6 preceding siblings ...)
  2015-06-24 20:37 ` manu at gcc dot gnu.org
@ 2015-06-24 20:42 ` manu at gcc dot gnu.org
  2015-06-25  7:12 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-24 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #9)
> I still think this is a latent bug in the way that Fortran is generating the
> PARAM_DECL for time, but if the Fortran maintainers are not interested in
> investigating that, then I could prepare a patch with any of the
> work-arounds I have proposed above as soon as a Fortran maintainer (someone
> that will approve the patch) chooses one.

Scratch that. Since the goal is to bluntly silence the warning, then the only
work-around I see is the one proposed in the previous comment. 

(It would be interesting to know at which GCC version or revision the warning
started appearing).
>From gcc-bugs-return-490128-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 21:24:50 2015
Return-Path: <gcc-bugs-return-490128-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3617 invoked by alias); 24 Jun 2015 21:24:49 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 3572 invoked by uid 48); 24 Jun 2015 21:24:46 -0000
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/58133] GCC should emit arm assembly following the unified syntax
Date: Wed, 24 Jun 2015 21:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ramana at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: cc
Message-ID: <bug-58133-4-dEAEVhAk6Q@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58133-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58133-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02460.txt.bz2
Content-length: 528

https://gcc.gnu.org/bugzilla/show_bug.cgi?idX133

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramana at gcc dot gnu.org

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Thumb1 Fixed for 5.0 with Terry's work - see release notes
https://gcc.gnu.org/gcc-5/changes.html


ARM state is a bit more involved.


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (7 preceding siblings ...)
  2015-06-24 20:42 ` manu at gcc dot gnu.org
@ 2015-06-25  7:12 ` dominiq at lps dot ens.fr
  2015-06-25  9:00 ` manu at gcc dot gnu.org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-06-25  7:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> (It would be interesting to know at which GCC version or revision
> the warning started appearing).

The warning for unused parameters appeared at r126486 (pr31129) and
-Wunused-parameter at r126486.

-Wunused-dummy-argument appeared at r159641 (pr38407). This option corresponds
to -Wunused-parameter for other FEs.

AFAICT these options are handled by the fortran FE and should not propagate to
the ME.


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (8 preceding siblings ...)
  2015-06-25  7:12 ` dominiq at lps dot ens.fr
@ 2015-06-25  9:00 ` manu at gcc dot gnu.org
  2015-06-25  9:41 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-25  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #11)
> > (It would be interesting to know at which GCC version or revision
> > the warning started appearing).
> 
> The warning for unused parameters appeared at r126486 (pr31129) and
> -Wunused-parameter at r126486.

Sorry, perhaps I was not clear. I meant: when did this testcase start
triggering a warning (or an ICE, whatever happened first) with
-Wunused-parameter? 

As I said in comment #4, GCC 4.3.1 had this warning and the warning option was
enabled for the testcase but the warning did not trigger. When did it start
triggering?

> AFAICT these options are handled by the fortran FE and should not propagate
> to the ME.

Wunused-parameter is both a Fortran and a middle-end option. It is unfortunate
it has a different meaning. One could argue that it should not be a middle-end
option and the warning should be given only by the FEs. My intuition is that if
you found a clean way to move the ME warning from cgraphunit.c to somewhere in
c-family/ , such a patch is likely to be approved and it will fix this problem
also.

However, all this has nothing to do with the warning triggering now, since this
has been the status quo since at least GCC 4.3.1. The reason it did not warn
before is that somehow the Fortran FE marked the TREE_DECL as TREE_NO_WARNING
and it doesn't do this anymore.
>From gcc-bugs-return-490175-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 25 09:16:53 2015
Return-Path: <gcc-bugs-return-490175-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 127081 invoked by alias); 25 Jun 2015 09:16:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 127006 invoked by uid 48); 25 Jun 2015 09:16:48 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/48956] -Wconversion should warn when a complex value is assigned to a real result
Date: Thu, 25 Jun 2015 09:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.6.0
X-Bugzilla-Keywords: diagnostic, easyhack
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
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: cc
Message-ID: <bug-48956-4-orVZm9w9mw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-48956-4@http.gcc.gnu.org/bugzilla/>
References: <bug-48956-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02507.txt.bz2
Content-length: 521

https://gcc.gnu.org/bugzilla/show_bug.cgi?idH956

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #18 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Backporting a new warning to a released branch isn't viable I'm afraid, it
would make upgrading from 5.1 to 5.2 unsafe for some users.


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (9 preceding siblings ...)
  2015-06-25  9:00 ` manu at gcc dot gnu.org
@ 2015-06-25  9:41 ` dominiq at lps dot ens.fr
  2015-06-26 16:46 ` manu at gcc dot gnu.org
  2015-06-29 16:26 ` manu at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-06-25  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> As I said in comment #4, GCC 4.3.1 had this warning and the warning option
> was enabled for the testcase but the warning did not trigger. When did
> it start triggering?

I don't see the warning with 4.5.4, but I see it with 4.6.4:

[macbook] f90/bug% gfortran-fsf-4.5
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_2.f90
-Wunused-parameter -c
[macbook] f90/bug% gfortran-fsf-4.6
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_2.f90
-Wunused-parameter -c
/opt/gcc/_clean/gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_2.f90:7:0:
warning: unused parameter 'dummy' [-Wunused-parameter]

Compiling the test gfortran.dg/warn_unused_dummy_argument_2.f90 with
-Wunused-parameter gives the ICE with 5.1/6.0.

To be more precise, I dont't get the warning for 4.7 with r182107 (2011-12-08),
but I get it with r182980 (2012-01-07), back ported to 4.6 between r179116
(2011-09-23) and r182981 (2012-01-07), possibly r182211 and r182213 (pr50923)


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (10 preceding siblings ...)
  2015-06-25  9:41 ` dominiq at lps dot ens.fr
@ 2015-06-26 16:46 ` manu at gcc dot gnu.org
  2015-06-29 16:26 ` manu at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-26 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |manu at gcc dot gnu.org

--- Comment #14 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I'm testing a patch that seems to fix this in a nice way.
>From gcc-bugs-return-490291-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 26 17:14:26 2015
Return-Path: <gcc-bugs-return-490291-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18992 invoked by alias); 26 Jun 2015 17:14:26 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18947 invoked by uid 55); 26 Jun 2015 17:14:23 -0000
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/66301] internal compiler error when using -fopt-info
Date: Fri, 26 Jun 2015 17:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jamborm at gcc dot gnu.org
X-Bugzilla-Status: NEW
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: <bug-66301-4-jzfnRloZYy@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66301-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66301-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02623.txt.bz2
Content-length: 561

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf301

--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Fri Jun 26 17:13:51 2015
New Revision: 225023

URL: https://gcc.gnu.org/viewcvs?rev"5023&root=gcc&view=rev
Log:
Fix PR 66301.

2015-06-26  Martin Jambor  <mjambor@suse.cz>

        PR debug/66301
        * tree-ssa-pre.c (before_dom_children): Check that dump_file is not
        NULL instead of calling dump_enabled_p.


Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/tree-ssa-pre.c


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

* [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
  2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
                   ` (11 preceding siblings ...)
  2015-06-26 16:46 ` manu at gcc dot gnu.org
@ 2015-06-29 16:26 ` manu at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: manu at gcc dot gnu.org @ 2015-06-29 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Author: manu
Date: Mon Jun 29 16:25:26 2015
New Revision: 225135

URL: https://gcc.gnu.org/viewcvs?rev=225135&root=gcc&view=rev
Log:
Wunused-parameter warnings are given from cgraph::finalize_function,
which is the middle-end. This is an oddity compared to other
-Wunused-* warnings. Moreover, Fortran has its own definition of
-Wunused-parameter that conflicts with the middle-end definition.

This patch moves the middle-end part of Wunused-parameter to the C/C++
FEs. I'm not sure if other FEs expected this warning to work. If so,
they do not seem to test for it. Ada, for example, explicitly disables
it.

gcc/ChangeLog:

2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR fortran/66605
        * cgraphunit.c (cgraph_node::finalize_function): Do not call
        do_warn_unused_parameter.
        * function.c (do_warn_unused_parameter): Move from here.
        * function.h (do_warn_unused_parameter): Do not declare.

gcc/c-family/ChangeLog:

2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR fortran/66605
        * c-common.c (do_warn_unused_parameter): Move here.
        * c-common.h (do_warn_unused_parameter): Declare.

gcc/ada/ChangeLog:

2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR fortran/66605
        * gcc-interface/misc.c (gnat_post_options): No need to disable
        warn_unused_parameter anymore.

gcc/cp/ChangeLog:

2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR fortran/66605
        * decl.c (finish_function): Call do_warn_unused_parameter.

gcc/testsuite/ChangeLog:

2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR fortran/66605
        * gfortran.dg/wunused-parameter.f90: New test.

gcc/c/ChangeLog:

2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR fortran/66605
        * c-decl.c (finish_function): Call do_warn_unused_parameter.

Added:
    trunk/gcc/testsuite/gfortran.dg/wunused-parameter.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/misc.c
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c-family/c-common.h
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-decl.c
    trunk/gcc/cgraphunit.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/function.c
    trunk/gcc/function.h
    trunk/gcc/testsuite/ChangeLog
>From gcc-bugs-return-490978-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 29 16:30:04 2015
Return-Path: <gcc-bugs-return-490978-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 87121 invoked by alias); 29 Jun 2015 16:30:04 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 86975 invoked by uid 48); 29 Jun 2015 16:29:58 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
Date: Mon, 29 Jun 2015 16:30:00 -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: 5.1.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: manu at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_known_to_work
Message-ID: <bug-66605-4-XEkbqaMp2i@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66605-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66605-4@http.gcc.gnu.org/bugzilla/>
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-SW-Source: 2015-06/txt/msg03310.txt.bz2
Content-length: 601

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |6.0

--- Comment #16 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
FIXED in GCC 6.

This is probably a regression, but I'm not sure if a backport would be
accepted. Otherwise, one of the brute-force fixes, like the one in comment #9,
should be enough to fix the ICE.
>From gcc-bugs-return-490979-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 29 17:09:00 2015
Return-Path: <gcc-bugs-return-490979-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 42425 invoked by alias); 29 Jun 2015 17:08:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 42335 invoked by uid 48); 29 Jun 2015 17:08:52 -0000
From: "mikpelinux at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66666] ARM wrong copy constructor address on multiple inheritance
Date: Mon, 29 Jun 2015 17:08:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: mikpelinux at gmail dot com
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: <bug-66666-4-MrZ3lC0sqX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66666-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66666-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg03311.txt.bz2
Content-length: 338

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf666

--- Comment #10 from Mikael Pettersson <mikpelinux at gmail dot com> ---
(In reply to Antonio Poggiali from comment #9)
> Sorry, this code:
>
> https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/cgraphunit.
> c?r1"1077&r2"1076&pathrev"1077

Yes, but I'm not convinced it's the real fix.


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

end of thread, other threads:[~2015-06-29 16:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 19:11 [Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 kyle.niemeyer at gmail dot com
2015-06-19 19:25 ` [Bug fortran/66605] " kyle.niemeyer at gmail dot com
2015-06-20 16:50 ` manu at gcc dot gnu.org
2015-06-24 18:48 ` manu at gcc dot gnu.org
2015-06-24 19:00 ` dominiq at lps dot ens.fr
2015-06-24 19:16 ` manu at gcc dot gnu.org
2015-06-24 19:38 ` dominiq at lps dot ens.fr
2015-06-24 20:37 ` manu at gcc dot gnu.org
2015-06-24 20:42 ` manu at gcc dot gnu.org
2015-06-25  7:12 ` dominiq at lps dot ens.fr
2015-06-25  9:00 ` manu at gcc dot gnu.org
2015-06-25  9:41 ` dominiq at lps dot ens.fr
2015-06-26 16:46 ` manu at gcc dot gnu.org
2015-06-29 16:26 ` manu at gcc dot gnu.org

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).