public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398
       [not found] <bug-63704-4@http.gcc.gnu.org/bugzilla/>
@ 2014-11-03  9:16 ` rguenth at gcc dot gnu.org
  2014-11-26 13:40 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-03  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code, lto
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-11-03
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
That's odd.  Ah, no.  We're transfering compile-time -fno-strict-aliasing
by setting alias-sets to zero and as the link command-line doesn't use
-fno-strict-aliasing (and we don't force the option somehow) that assert
is "easy" to trigger (and broken).  We should simply remove it.


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

* [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398
       [not found] <bug-63704-4@http.gcc.gnu.org/bugzilla/>
  2014-11-03  9:16 ` [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398 rguenth at gcc dot gnu.org
@ 2014-11-26 13:40 ` rguenth at gcc dot gnu.org
  2014-11-27  9:51 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-26 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Oh, no.  It's actually a genuine bug.

__attribute__((optimize("O3"))) enables -fstrict-aliasing, so if the
rest of the TU is compiled with -fno-strict-aliasing it depends on
prue luck if 'int' (as in this case) gets alias-set zero (a function
compiled with -fno-strict-aliasing calls get_alias_set on it) or
a non-zero alias-set (the -O3 function calls get_alias_set on 'int').

Of course LTO just makes it more likely to trigger.

-> -fstrict-aliasing may not be altered via attribute((optimize())).


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

* [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398
       [not found] <bug-63704-4@http.gcc.gnu.org/bugzilla/>
  2014-11-03  9:16 ` [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398 rguenth at gcc dot gnu.org
  2014-11-26 13:40 ` rguenth at gcc dot gnu.org
@ 2014-11-27  9:51 ` rguenth at gcc dot gnu.org
  2014-11-27  9:52 ` rguenth at gcc dot gnu.org
  2015-01-15 16:03 ` marxin at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-27  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

* [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398
       [not found] <bug-63704-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-11-27  9:51 ` rguenth at gcc dot gnu.org
@ 2014-11-27  9:52 ` rguenth at gcc dot gnu.org
  2015-01-15 16:03 ` marxin at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-27  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Nov 27 09:51:32 2014
New Revision: 218114

URL: https://gcc.gnu.org/viewcvs?rev=218114&root=gcc&view=rev
Log:
2014-11-27  Richard Biener  <rguenther@suse.de>

    PR middle-end/63704
    * alias.c (mems_in_disjoint_alias_sets_p): Remove assert
    and instead return false when !fstrict-aliasing.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/alias.c


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

* [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398
       [not found] <bug-63704-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-11-27  9:52 ` rguenth at gcc dot gnu.org
@ 2015-01-15 16:03 ` marxin at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2015-01-15 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Author: marxin
Date: Thu Jan 15 16:02:28 2015
New Revision: 219663

URL: https://gcc.gnu.org/viewcvs?rev=219663&root=gcc&view=rev
Log:
Backport from mainline

        2014-11-27  Richard Biener  <rguenther@suse.de>

    PR middle-end/63704
    * alias.c (mems_in_disjoint_alias_sets_p): Remove assert
    and instead return false when !fstrict-aliasing.


Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/alias.c
>From gcc-bugs-return-473368-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 15 16:03:53 2015
Return-Path: <gcc-bugs-return-473368-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22531 invoked by alias); 15 Jan 2015 16:03:53 -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 22398 invoked by uid 55); 15 Jan 2015 16:03:42 -0000
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398
Date: Thu, 15 Jan 2015 16:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: ice-on-valid-code, lto
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marxin at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63704-4-W6X0NC96QZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63704-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63704-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-01/txt/msg01362.txt.bz2
Content-length: 578

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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Author: marxin
Date: Thu Jan 15 16:03:05 2015
New Revision: 219664

URL: https://gcc.gnu.org/viewcvs?rev=219664&root=gcc&view=rev
Log:
Backport from mainline

        2014-11-27  Richard Biener  <rguenther@suse.de>

    PR middle-end/63704
    * alias.c (mems_in_disjoint_alias_sets_p): Remove assert
    and instead return false when !fstrict-aliasing.


Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/alias.c
>From gcc-bugs-return-473369-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 15 16:21:56 2015
Return-Path: <gcc-bugs-return-473369-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 6310 invoked by alias); 15 Jan 2015 16:21:55 -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 6263 invoked by uid 48); 15 Jan 2015 16:21:49 -0000
From: "dgilbert at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/64614] New: bogus used initialized warning (in gcc 4.9.2 not in 4.8.3); switch statement versus &
Date: Thu, 15 Jan 2015 16:21: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-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dgilbert at redhat 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-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-64614-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-01/txt/msg01363.txt.bz2
Content-length: 1365

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

            Bug ID: 64614
           Summary: bogus used initialized warning (in gcc 4.9.2 not in
                    4.8.3); switch statement versus &
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dgilbert at redhat dot com

gcc t.c -O1 -Wall -Wextra

(Any -O value 1 or above)

t.c: In function ‘foo’:
t.c:15:15: warning: ‘tmp’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
       tmp[11] = 15;
               ^
(This code is similar to qemu's arch_init.c/ram_load loop where I hit this)

Gcc doesn't seem to be spotting that the tmp = baz initialiser will always
happen for the switch cases that use tmp.

this is using the Fedora 21 gcc: gcc version 4.9.2 20141101 (Red Hat 4.9.2-1)
(GCC) 
package: gcc-4.9.2-1.fc21.x86_64
It doesn't trigger for me on gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) 


char *foo(int bar, char *baz)
{
  char *tmp;

  if (bar & 3) {
      tmp = baz;
  }

  switch (bar) {
  case 1:
      tmp[5] = 7;
      break;

  case 2:
      tmp[11] = 15;
      break;

  default:
      tmp = 0;
      break;
  }

  return tmp;
}
>From gcc-bugs-return-473370-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 15 16:24:09 2015
Return-Path: <gcc-bugs-return-473370-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9281 invoked by alias); 15 Jan 2015 16:24:09 -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 9241 invoked by uid 48); 15 Jan 2015 16:24:04 -0000
From: "jvoosten at bankai dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64611] Using a << operator inside an overloaded << operator gives compile error
Date: Thu, 15 Jan 2015 16:24: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.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jvoosten at bankai dot nl
X-Bugzilla-Status: UNCONFIRMED
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-64611-4-8BluKBiRpP@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64611-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64611-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-01/txt/msg01364.txt.bz2
Content-length: 245

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

--- Comment #3 from J. van Oosten <jvoosten at bankai dot nl> ---
Yes, that works. Surprising simple solution, but I'm still wondering if this is
a bug or a feature....

Thanks for the reply.


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

end of thread, other threads:[~2015-01-15 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-63704-4@http.gcc.gnu.org/bugzilla/>
2014-11-03  9:16 ` [Bug lto/63704] -flto internal compiler error: in mems_in_disjoint_alias_sets_p, at alias.c:398 rguenth at gcc dot gnu.org
2014-11-26 13:40 ` rguenth at gcc dot gnu.org
2014-11-27  9:51 ` rguenth at gcc dot gnu.org
2014-11-27  9:52 ` rguenth at gcc dot gnu.org
2015-01-15 16:03 ` marxin 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).