public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/63748] [4.9 Regression] wrong may be used uninitialized warning (abnormal edges)
Date: Mon, 23 Feb 2015 18:30:00 -0000	[thread overview]
Message-ID: <bug-63748-4-QLitaKbGaI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63748-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |24639
         Depends on|24639                       |

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Fix blocks/depends list
>From gcc-bugs-return-478206-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 23 17:56:40 2015
Return-Path: <gcc-bugs-return-478206-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30708 invoked by alias); 23 Feb 2015 17:56:39 -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 30642 invoked by uid 48); 23 Feb 2015 17:56:35 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/60741] [-Wmaybe-uninitialized] false negative and confusing warning message
Date: Mon, 23 Feb 2015 19:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu 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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: blocked dependson
Message-ID: <bug-60741-4-ZZziRF6Gna@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60741-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60741-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-02/txt/msg02538.txt.bz2
Content-length: 475

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |24639
         Depends on|24639                       |

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Fix blocks/depends list.
>From gcc-bugs-return-478207-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 23 17:57:18 2015
Return-Path: <gcc-bugs-return-478207-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32171 invoked by alias); 23 Feb 2015 17:57:18 -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 32085 invoked by uid 48); 23 Feb 2015 17:57:14 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56670] Allocatable-length character var causes bogus warning with -Wall
Date: Mon, 23 Feb 2015 19:17: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: 4.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu 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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc blocked dependson
Message-ID: <bug-56670-4-PErC88fI5b@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56670-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56670-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-02/txt/msg02539.txt.bz2
Content-length: 548

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org
             Blocks|                            |24639
         Depends on|24639                       |

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Fix blocks/depends list.
>From gcc-bugs-return-478208-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 23 17:58:06 2015
Return-Path: <gcc-bugs-return-478208-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9380 invoked by alias); 23 Feb 2015 17:58:05 -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 6054 invoked by uid 48); 23 Feb 2015 17:58:01 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/65178] incorrect -Wmaybe-uninitialized when using nested loops
Date: Mon, 23 Feb 2015 19:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu 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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on cc blocked everconfirmed
Message-ID: <bug-65178-4-4lFt4tKP5b@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65178-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65178-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-02/txt/msg02540.txt.bz2
Content-length: 1306

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-23
                 CC|                            |manu at gcc dot gnu.org
             Blocks|                            |24639
     Ever confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
A minimized testcase:

void *bar(int);
char *
foo (void)
{ 
  char *c = "bla";
  char *buf;
  for (int a = 1;; a = 0)
    { 
      for (char *s = c; *s; ++s)
        { 
        }
      if (!a) break;
      buf = (char *) bar (1);
    }
  return buf;
}

It fails in GCC 5.0 with -O1, -O2 and -O3. I think we have several reports
about this: GCC simply does not understand that the loop body is executed at
least once, thus there should be no (default) entry edge for the PHI node of
buf.

I think it is a missed optimization also: If buf were initialized, the initial
value could be dropped.
>From gcc-bugs-return-478209-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 23 18:05:50 2015
Return-Path: <gcc-bugs-return-478209-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18476 invoked by alias); 23 Feb 2015 18:05:50 -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 18428 invoked by uid 48); 23 Feb 2015 18:05:47 -0000
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/61831] [4.9/ 5 Regression] runtime error: pointer being freed was not allocated
Date: Mon, 23 Feb 2015 19:23: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: 4.9.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mikael at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61831-4-AXEl6Lkl4j@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61831-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61831-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-02/txt/msg02541.txt.bz2
Content-length: 1479

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

--- Comment #42 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #41)
> My work patch is:

updated work patch below.
The testcase passes with it, at the price of leaking memory

Index: trans-expr.c
===================================================================
--- trans-expr.c    (révision 220717)
+++ trans-expr.c    (copie de travail)
@@ -4949,7 +4949,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol *
       if (e && (e->ts.type == BT_DERIVED || e->ts.type == BT_CLASS)
         && e->ts.u.derived->attr.alloc_comp
         && !(e->symtree && e->symtree->n.sym->attr.pointer)
-        && (e->expr_type != EXPR_VARIABLE && !e->rank))
+        && (e->expr_type != EXPR_VARIABLE
+        && e->expr_type != EXPR_STRUCTURE && !e->rank))
         {
       int parm_rank;
       tmp = build_fold_indirect_ref_loc (input_location,
@@ -7131,7 +7132,8 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * e
   if (expr->ts.type == BT_DERIVED && expr->rank
       && !gfc_is_finalizable (expr->ts.u.derived, NULL)
       && expr->ts.u.derived->attr.alloc_comp
-      && expr->expr_type != EXPR_VARIABLE)
+      && expr->expr_type != EXPR_VARIABLE
+      && expr->expr_type != EXPR_ARRAY)
     {
       tree tmp;
>From gcc-bugs-return-478210-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Feb 23 18:21:46 2015
Return-Path: <gcc-bugs-return-478210-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3469 invoked by alias); 23 Feb 2015 18:21:46 -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 30169 invoked by uid 48); 23 Feb 2015 18:21:43 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/65150] [5 Regression] r220875 causes bootstrap failure on x86_64 darwin
Date: Mon, 23 Feb 2015 19:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65150-4-pUs8i3ocF2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65150-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65150-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-02/txt/msg02542.txt.bz2
Content-length: 1019

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #7)
> here we fall through to the case were we make a thunk - IFF we were not able
> to rmove the alias.  However, potentially, we already moved all the callers
> from the alias to the original.
>
> (a) is that safe?

Why not?

> (b) we might as well avoid the work by testing whether the alias will be
> removable before we set redirect_callers?

Redirecting the callers is beneficial even when we create trunk.
For the redirected callers, they will jump directly to the right function,
while
without redirection you call a thunk, which in the better case just jumps to
the right function (ie. sibcall), in the worse case calls it and then returns.
So you save a few instructions on each redirected call.
When alias is created instead of redirection (in that case we don't redirect
callers right now), the only advantage of redirection would be tail recursion.


  parent reply	other threads:[~2015-02-23 17:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 12:52 [Bug tree-optimization/63748] New: may be used uninitialized warning on variable definition with initializer amodra at gmail dot com
2014-11-05 13:15 ` [Bug tree-optimization/63748] [4.9/5 Regression] " mpolacek at gcc dot gnu.org
2014-11-07 21:57 ` uweigand at gcc dot gnu.org
2014-11-07 22:42 ` uweigand at gcc dot gnu.org
2014-11-10 12:48 ` [Bug tree-optimization/63748] [4.9/5 Regression] wrong may be used uninitialized warning (abnormal edges) uweigand at gcc dot gnu.org
2014-11-10 20:44 ` ppalka at gcc dot gnu.org
2014-11-11  5:23 ` amodra at gmail dot com
2014-11-24 13:49 ` [Bug tree-optimization/63748] [4.9 " rguenth at gcc dot gnu.org
2014-11-24 16:56 ` rguenth at gcc dot gnu.org
2015-02-23 18:30 ` manu at gcc dot gnu.org [this message]
2015-06-26 20:18 ` jakub at gcc dot gnu.org
2015-06-26 20:38 ` jakub at gcc dot gnu.org

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=bug-63748-4-QLitaKbGaI@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).