From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17356 invoked by alias); 16 Apr 2013 11:09:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17328 invoked by uid 48); 16 Apr 2013 11:09:23 -0000 From: "baugesta at cisco dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56977] New: gcc -Og incorrectly warns about 'constant zero length parameter' Date: Tue, 16 Apr 2013 11:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: baugesta at cisco dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01522.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56977 Bug #: 56977 Summary: gcc -Og incorrectly warns about 'constant zero length parameter' Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: baugesta@cisco.com Created attachment 29881 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D29881 Preprocessed version of snippet in the Description field. Compiling this tiny snippet with the command 'gcc -v -Og' produces an incor= rect warning about zero length parameter: #include void foo(char *buf, size_t w, size_t h) { size_t n =3D w * h; if (n > 0) memset(buf, 123, n); } The warning looks like this: /usr/include/bits/string3.h:81:30: warning: call to =E2=80=98__warn_memset_= zero_len=E2=80=99 declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [enabled by default] __warn_memset_zero_len (); Output from gcc -v: $ gcc -v Using built-in specs. COLLECT_GCC=3D/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0/gcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.8.0/work/gcc-4.8.0/config= ure --prefix=3D/usr --bindir=3D/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0 --includedir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/include --datadir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0 --mandir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/include/g++= -v4 --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-n= ls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=3Dm32,m64 --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=3D/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/python --enable-checking=3Drelease --disable-libgcj --enable-libstdcxx-time --disable-libquadmath --enable-languages=3Dc,c++,objc --enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --enable-targets=3Dall --with-bugurl=3Dhttp://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo 4.8.0 p1.1, pie-0.5.5' Thread model: posix gcc version 4.8.0 (Gentoo 4.8.0 p1.1, pie-0.5.5) >>From gcc-bugs-return-420378-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 16 11:10:10 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 18327 invoked by alias); 16 Apr 2013 11:10:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 18280 invoked by uid 48); 16 Apr 2013 11:10:07 -0000 From: "krebbel at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/56978] New: memset-chk.c failure since r197671 Date: Tue, 16 Apr 2013 11:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: krebbel at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01523.txt.bz2 Content-length: 3565 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56978 Bug #: 56978 Summary: memset-chk.c failure since r197671 Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned@gcc.gnu.org ReportedBy: krebbel@gcc.gnu.org /home/andreas/clean/gcc-head-build/gcc/xgcc -B/home/andreas/clean/gcc-head-build/gcc/ /home/andreas/clean/gcc-head/gcc/testsuite/gcc.c-torture/execute/builtins/m= emset-chk.c /home/andreas/clean/gcc-head/gcc/testsuite/gcc.c-torture/execute/builtins/m= emset-chk-lib.c /home/andreas/clean/gcc-head/gcc/testsuite/gcc.c-torture/execute/builtins/l= ib/main.c -fno-diagnostics-show-caret -w -O3 -fomit-frame-pointer -funroll-loops -fno-tree-loop-distribute-patterns -lm -o /home/andreas/clean/gcc-head-build/gcc/testsuite/gcc5/memset-chk.x /home/andreas/clean/gcc-head/gcc/testsuite/gcc.c-torture/execute/builtins/m= emset-chk.c: In function =E2=80=98test5=E2=80=99: /home/andreas/clean/gcc-head/gcc/testsuite/gcc.c-torture/execute/builtins/m= emset-chk.c:552:1: internal compiler error: in emit_move_insn_1, at expr.c:3428 0x802f712b emit_move_insn_1(rtx_def*, rtx_def*) /home/andreas/clean/gcc-head/gcc/expr.c:3428 0x802f71c5 emit_move_insn(rtx_def*, rtx_def*) /home/andreas/clean/gcc-head/gcc/expr.c:3526 0x802d68bb force_reg /home/andreas/clean/gcc-head/gcc/explow.c:676 0x802f8053 convert_move(rtx_def*, rtx_def*, int) /home/andreas/clean/gcc-head/gcc/expr.c:590 0x802f87b9 convert_modes(machine_mode, machine_mode, rtx_def*, int) /home/andreas/clean/gcc-head/gcc/expr.c:781 0x804bd919 expand_binop_directly /home/andreas/clean/gcc-head/gcc/optabs.c:1427 0x804bb57f expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_de= f*, int, optab_methods) /home/andreas/clean/gcc-head/gcc/optabs.c:1543 0x804bd70d expand_simple_binop(machine_mode, rtx_code, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) /home/andreas/clean/gcc-head/gcc/optabs.c:1291 0x802fb645 force_operand(rtx_def*, rtx_def*) /home/andreas/clean/gcc-head/gcc/expr.c:7054 0x8094d3c3 doloop_modify /home/andreas/clean/gcc-head/gcc/loop-doloop.c:480 0x8094d3c3 doloop_optimize /home/andreas/clean/gcc-head/gcc/loop-doloop.c:750 0x8094d3c3 doloop_optimize_loops() /home/andreas/clean/gcc-head/gcc/loop-doloop.c:764 0x804549d7 rtl_doloop /home/andreas/clean/gcc-head/gcc/loop-init.c:543 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Reghunt indicates that the error has been introduced with: 2013-04-10 Richard Biener * passes.c (execute_todo): Do not call ggc_collect conditional here. (execute_one_ipa_transform_pass): But unconditionally here. (execute_one_pass): And here. (init_optimization_passes): Remove reload pass. * tree-pass.h (TODO_ggc_collect): Remove. (pass_reload): Likewise. * ira.c (do_reload): Merge into ... (ira): ... this. (rest_of_handle_reload): Remove. (pass_reload): Likewise. * config/i386/i386.c (ix86_option_override): Refer to ira instead of reload for vzeroupper pass placement. * : Remove TODO_ggc_collect from todo_flags_start and todo_flags_finish of all passes. * g++.dg/pr55604.C: Use -fdump-rtl-ira. >>From gcc-bugs-return-420379-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 16 11:13:37 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 20204 invoked by alias); 16 Apr 2013 11:13:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 20165 invoked by uid 48); 16 Apr 2013 11:13:34 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56969] [4.9 Regression] ISO_C_BINDING regression with current trunk Date: Tue, 16 Apr 2013 11:13: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-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01524.txt.bz2 Content-length: 442 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56969 --- Comment #3 from Tobias Burnus 2013-04-16 11:13:34 UTC --- Draft patch: --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -4238,3 +4238,4 @@ got_specific: expr->value.function.isym = specific; - gfc_intrinsic_symbol (expr->symtree->n.sym); + if (!expr->symtree->n.sym->module) + gfc_intrinsic_symbol (expr->symtree->n.sym);