public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/63748] New: may be used uninitialized warning on variable definition with initializer
@ 2014-11-05 12:52 amodra at gmail dot com
  2014-11-05 13:15 ` [Bug tree-optimization/63748] [4.9/5 Regression] " mpolacek at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: amodra at gmail dot com @ 2014-11-05 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63748
           Summary: may be used uninitialized warning on variable
                    definition with initializer
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amodra at gmail dot com

Created attachment 33892
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33892&action=edit
preprocessed source

Found when compiling gdb's eval.c using gcc-4.9.1 or current trunk,
x86_64-linux or powerpc64-linux.

/src/binutils-gdb/gdb/eval.c: In function ‘evaluate_subexp_standard’:
/src/binutils-gdb/gdb/eval.c:745:16: error: ‘ret’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
  struct value *ret = NULL;
                ^

More bogus warnings follow with -O -Wall on the attached preprocessed source.
>From gcc-bugs-return-465795-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 05 12:55:02 2014
Return-Path: <gcc-bugs-return-465795-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30346 invoked by alias); 5 Nov 2014 12:55:01 -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 29994 invoked by uid 48); 5 Nov 2014 12:54:58 -0000
From: "mkuvyrkov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/61033] [4.8/4.9 Regression] Infinite loop in variable tracking
Date: Wed, 05 Nov 2014 12:55: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: 4.9.0
X-Bugzilla-Keywords: compile-time-hog
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mkuvyrkov at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: michael.collison at linaro dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61033-4-ZgAkZNBGvR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61033-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61033-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: 2014-11/txt/msg00267.txt.bz2
Content-length: 175

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

--- Comment #10 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
Michael,

What is the status of this bug?

Thanks.


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

* [Bug tree-optimization/63748] [4.9/5 Regression] may be used uninitialized warning on variable definition with initializer
  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 ` mpolacek at gcc dot gnu.org
  2014-11-07 21:57 ` uweigand at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-11-05 13:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-05
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.9.3
            Summary|may be used uninitialized   |[4.9/5 Regression] may be
                   |warning on variable         |used uninitialized warning
                   |definition with initializer |on variable definition with
                   |                            |initializer
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug tree-optimization/63748] [4.9/5 Regression] may be used uninitialized warning on variable definition with initializer
  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
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: uweigand at gcc dot gnu.org @ 2014-11-07 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

Ulrich Weigand <uweigand at gcc dot gnu.org> changed:

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

--- Comment #2 from Ulrich Weigand <uweigand at gcc dot gnu.org> ---
Much simplified test case:

typedef struct __jmp_buf_tag jmp_buf;
extern int setjmp (jmp_buf *);
jmp_buf *alloc_jmp_buf ();
int foo (void *);

int
test (int op, int noside)
{
  void *argvec = 0;

  if (op)
    {
      jmp_buf *buf = alloc_jmp_buf ();
      setjmp (buf);

      if (noside)
        goto nosideret;

    do_call_it:

      if (noside)
        goto nosideret;

      return foo (argvec);
    }

  argvec = __builtin_alloca (1);
  goto do_call_it;

nosideret:
  return 1;
}

results in:

xxx.i: In function ‘test’:
xxx.i:14:16: error: ‘buf’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
       jmp_buf *buf = alloc_jmp_buf ();
>From gcc-bugs-return-466018-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 07 21:59:25 2014
Return-Path: <gcc-bugs-return-466018-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1916 invoked by alias); 7 Nov 2014 21:59:25 -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 1860 invoked by uid 48); 7 Nov 2014 21:59:22 -0000
From: "howarth at bromo dot med.uc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/63773] [meta-bug] Restoring darwin bootstrap for gcc 5.0
Date: Fri, 07 Nov 2014 21:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: howarth at bromo dot med.uc.edu
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:
Message-ID: <bug-63773-4-DoIIbnd7LD@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63773-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63773-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: 2014-11/txt/msg00490.txt.bz2
Content-length: 1427

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

--- Comment #4 from howarth at bromo dot med.uc.edu ---
(In reply to Francois-Xavier Coudert from comment #3)
> I'd like to help, but it's such a mess. There is not one PR per distinct
> issue, but various things reported in long threads. 
> 
> Regarding the first two patches (libcc1 and ipa-chkp.c), they are
> straightforward and should be approved fast. Don't hesitate to ping them
> every few days.
> 
> The "nonlocal goto and setjmp" patch has been committed.
> 
> But… the remaining patch
> (https://gcc.gnu.org/bugzilla/attachment.cgi?id=33843) does not appear
> enough to restore bootstrap. I still get:
> 
> ld: illegal text reloc in 'std::strstream::strstream()' to 'construction
> vtable for std::basic_ostream<char, std::char_traits<char>
> >-in-std::strstream' for architecture x86_64
> 
> is there another patch required?

Did you apply the PA ICF aliasing restriction patch from
https://gcc.gnu.org/bugzilla/attachment.cgi?id=33843? Without it, the new
ipa-icf pass will erroneously attempt alias creation on targets which don't
support (it like MACH-O on darwin). The cryptic "ld: illegal text reloc" error
is emitted from the darwin linker because the use of "-undefined
dynamic_lookup" masks the fact that undefined symbols result from the
inappropriate alias creation.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63622#c12
>From gcc-bugs-return-466019-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 07 22:03:54 2014
Return-Path: <gcc-bugs-return-466019-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4102 invoked by alias); 7 Nov 2014 22:03:54 -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 4059 invoked by uid 48); 7 Nov 2014 22:03:50 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/63748] [4.9/5 Regression] may be used uninitialized warning on variable definition with initializer
Date: Fri, 07 Nov 2014 22:03: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: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: pinskia 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.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63748-4-yq00jsfVMR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63748-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63748-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: 2014-11/txt/msg00491.txt.bz2
Content-length: 285

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this is hard warning to avoid in the compiler as we don't know if foo
calls longjmp or not.  Note we don't know if alloc_jmp_buf does a push
somewhere else.


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

* [Bug tree-optimization/63748] [4.9/5 Regression] may be used uninitialized warning on variable definition with initializer
  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
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: uweigand at gcc dot gnu.org @ 2014-11-07 22:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ulrich Weigand <uweigand at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> I think this is hard warning to avoid in the compiler as we don't know if
> foo calls longjmp or not.  Note we don't know if alloc_jmp_buf does a push
> somewhere else.

Huh?  No matter what, "buf" is in fact never used uninitialized in this
function, and that should be trivial to see; the only use of "buf" occurs in
line 17 immediately after the definition of "buf" in line 16, whether any
longjmp is ever called or not.

Also, if any of the gotos in this function is removed, the warning disappears. 
The problem seems to be related to some call-graph optimizations (note that the
if (noside) check is partially redundant).


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

* [Bug tree-optimization/63748] [4.9/5 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (2 preceding siblings ...)
  2014-11-07 22:42 ` uweigand at gcc dot gnu.org
@ 2014-11-10 12:48 ` uweigand at gcc dot gnu.org
  2014-11-10 20:44 ` ppalka at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: uweigand at gcc dot gnu.org @ 2014-11-10 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Ulrich Weigand <uweigand at gcc dot gnu.org> ---
I guess I can see why there might be an abnormal edge starting at bb 3, or at
least, that the compiler might not be easily able to deduce that it isn't
necessary.

However, I do not understand why any of the abnormal edges *target* bb5
*before* the setjmp call.  Shouldn't an abnormal edge due to a longjmp end up
*after* the setjmp?  After all, the setjmp itself (including the preparation of
its arguments) is *not* executed twice; the effect of the longjmp is simply to
make the setjmp *return* twice.


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

* [Bug tree-optimization/63748] [4.9/5 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (3 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ppalka at gcc dot gnu.org @ 2014-11-10 20:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from ppalka at gcc dot gnu.org ---
Author: ppalka
Date: Mon Nov 10 20:43:40 2014
New Revision: 217317

URL: https://gcc.gnu.org/viewcvs?rev=217317&root=gcc&view=rev
Log:
2014-11-10  Patrick Palka  <ppalka@gcc.gnu.org>

gcc/
    PR middle-end/63748
    * tree-ssa-propagate.c (may_propagate_copy): Allow propagating
    SSA copies whose source and destination names both occur in
    abnormal PHIs.

gcc/testsuite/
    PR middle-end/63748
    * gcc.dg/pr63748.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.dg/pr63748.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-propagate.c


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

* [Bug tree-optimization/63748] [4.9/5 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (4 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: amodra at gmail dot com @ 2014-11-11  5:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Alan Modra <amodra at gmail dot com> ---
Thanks!  Fix confirmed with gdb sources prior to the workaround Uli committed. 
Is the fix appropriate for gcc-4.9?  If not, I'll be happy to adjust the target
milestone and close the bug.


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

* [Bug tree-optimization/63748] [4.9 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (5 preceding siblings ...)
  2014-11-11  5:23 ` amodra at gmail dot com
@ 2014-11-24 13:49 ` rguenth at gcc dot gnu.org
  2014-11-24 16:56 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
      Known to work|                            |5.0
            Summary|[4.9/5 Regression] wrong    |[4.9 Regression] wrong may
                   |may be used uninitialized   |be used uninitialized
                   |warning (abnormal edges)    |warning (abnormal edges)

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the fix is appropriate to backport if its prerequesite (making
out-of-SSA coalescing ignore default defs) are backported.

Fixed on trunk.


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

* [Bug tree-optimization/63748] [4.9 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (6 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug tree-optimization/63748] [4.9 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (7 preceding siblings ...)
  2014-11-24 16:56 ` rguenth at gcc dot gnu.org
@ 2015-02-23 18:30 ` manu at gcc dot gnu.org
  2015-06-26 20:18 ` jakub at gcc dot gnu.org
  2015-06-26 20:38 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu.org @ 2015-02-23 18:30 UTC (permalink / raw)
  To: gcc-bugs

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.


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

* [Bug tree-optimization/63748] [4.9 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (8 preceding siblings ...)
  2015-02-23 18:30 ` manu at gcc dot gnu.org
@ 2015-06-26 20:18 ` jakub at gcc dot gnu.org
  2015-06-26 20:38 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


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

* [Bug tree-optimization/63748] [4.9 Regression] wrong may be used uninitialized warning (abnormal edges)
  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
                   ` (9 preceding siblings ...)
  2015-06-26 20:18 ` jakub at gcc dot gnu.org
@ 2015-06-26 20:38 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-06-26 20:18 ` jakub at gcc dot gnu.org
2015-06-26 20:38 ` jakub 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).