public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/78440] New: [7 Regression] [c++17]  Incompatible exception-specification not diagnosed in explicit instantiation
@ 2016-11-21  3:20 trippels at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: trippels at gcc dot gnu.org @ 2016-11-21  3:20 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 233282 bytes --]

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

            Bug ID: 78440
           Summary: [7 Regression] [c++17]  Incompatible
                    exception-specification not diagnosed in explicit
                    instantiation
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

markus@x4 tmp % cat compat.ii
template <typename T> void foo() noexcept {}
template <typename T> void bar() throw() {}
template void foo<int>();
template void bar<int>();

markus@x4 tmp % g++ -Wall -Wextra -std=c++1z -c compat.ii
markus@x4 tmp % clang++ -std=c++1z -c compat.ii
compat.ii:3:15: error: explicit instantiation of 'foo' does not refer to a
function template, variable template, member function, member class, or static
data member
template void foo<int>();
              ^
compat.ii:1:28: note: candidate template ignored: could not match 'void ()
noexcept' against 'void ()'
template <typename T> void foo() noexcept {}
                           ^
compat.ii:4:15: error: explicit instantiation of 'bar' does not refer to a
function template, variable template, member function, member class, or static
data member
template void bar<int>();
              ^
compat.ii:2:28: note: candidate template ignored: could not match 'void ()
throw()' against 'void ()'
template <typename T> void bar() throw() {}
                           ^
2 errors generated.
>From gcc-bugs-return-544277-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 03:20:39 2016
Return-Path: <gcc-bugs-return-544277-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4314 invoked by alias); 21 Nov 2016 03:20:38 -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 4084 invoked by uid 48); 21 Nov 2016 03:20:19 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/78440] [7 Regression] [c++17]  Incompatible exception-specification not diagnosed in explicit instantiation
Date: Mon, 21 Nov 2016 03:29: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels 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-78440-4-mZLRyYEGzA@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78440-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78440-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: 2016-11/txt/msg02311.txt.bz2
Content-length: 1192

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

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
except.spec/5:

»If any declaration of a function has an exception-specification that is not a
noexcept-specification allowing all exceptions, all declarations, including the
definition and any explicit specialization, of that function shall have a
compatible exception-specification. If any declaration of a pointer to
function, reference to function, or pointer to member function has an
exception-specification, all occurrences of that declaration shall have a
compatible exception-specification. If a declaration of a function has an
implicit exception specification, other declarations of the function shall not
specify an exception-specification. In an explicit instantiation an
exception-specification may be specified, but is not required. If an
exception-specification is specified in an explicit instantiation directive, it
shall be compatible with the exception-specifications of other declarations of
that function. A diagnostic is required only if the exception-specifications
are not compatible within a single translation unit.«
>From gcc-bugs-return-544278-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 03:29:50 2016
Return-Path: <gcc-bugs-return-544278-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30393 invoked by alias); 21 Nov 2016 03:29: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 12249 invoked by uid 48); 21 Nov 2016 03:29:24 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/78440] [7 Regression] [c++17]  Incompatible exception-specification not diagnosed in explicit instantiation
Date: Mon, 21 Nov 2016 03:40: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
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 resolution
Message-ID: <bug-78440-4-fuhDILKdXM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78440-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78440-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: 2016-11/txt/msg02312.txt.bz2
Content-length: 586

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
»In an explicit instantiation an exception-specification may be specified, but
is not required.«
Closing as invalid, sorry for the noise.
>From gcc-bugs-return-544279-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 03:40:41 2016
Return-Path: <gcc-bugs-return-544279-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 62900 invoked by alias); 21 Nov 2016 03:40:40 -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 62663 invoked by uid 48); 21 Nov 2016 03:40:27 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/78360] [C++1z] missing throw()s in explicit instantiation declarations for has_facet()
Date: Mon, 21 Nov 2016 03:52:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
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 resolution
Message-ID: <bug-78360-4-2Xe2cxpD9h@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78360-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78360-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: 2016-11/txt/msg02313.txt.bz2
Content-length: 565

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
except.spec/5 says:
»In an explicit instantiation an exception-specification may be specified, but
is not required.«
>From gcc-bugs-return-544280-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 03:52:04 2016
Return-Path: <gcc-bugs-return-544280-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 87586 invoked by alias); 21 Nov 2016 03:52: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 87429 invoked by uid 48); 21 Nov 2016 03:51:51 -0000
From: "eric at efcs dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/78441] New: [variant] variant_alternative doesn't allow cv qualifiers
Date: Mon, 21 Nov 2016 03:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: eric at efcs dot ca
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-78441-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: 2016-11/txt/msg02314.txt.bz2
Content-length: 659

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

            Bug ID: 78441
           Summary: [variant] variant_alternative doesn't allow cv
                    qualifiers
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

The below reproducer fails to compile.

// Reproducer
#include <variant>

using V = std::variant<int>;
using T = std::variant_alternative_t<0, const V>;
static_assert(std::is_same_v<T, const int>, "");
>From gcc-bugs-return-544281-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 03:55:46 2016
Return-Path: <gcc-bugs-return-544281-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 90994 invoked by alias); 21 Nov 2016 03:55: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 90908 invoked by uid 48); 21 Nov 2016 03:55:33 -0000
From: "eric at efcs dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/78442] New: [variant] std::get<...>(Variant) is not constexpr.
Date: Mon, 21 Nov 2016 04:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: eric at efcs dot ca
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-78442-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: 2016-11/txt/msg02315.txt.bz2
Content-length: 709

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

            Bug ID: 78442
           Summary: [variant] std::get<...>(Variant) is not constexpr.
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

See the below reproducer:

#include <variant>

constexpr bool test() {
  std::variant<int, void*> v(42);
  auto const& cv = v;
  static_assert(std::get<0>(v) == 42, "");
  static_assert(std::get<0>(cv) == 42, "");
  return true;
}
static_assert(test(), "");

int main() {}
>From gcc-bugs-return-544283-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 05:03:18 2016
Return-Path: <gcc-bugs-return-544283-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14405 invoked by alias); 21 Nov 2016 05:03:17 -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 14277 invoked by uid 48); 21 Nov 2016 05:03:05 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug objc++/78418] [7 Regression] Several failures in the obj-c++ test suite after revision r242377 on x86_64-apple-darwin16
Date: Mon, 21 Nov 2016 05:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: objc++
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution assigned_to target_milestone
Message-ID: <bug-78418-4-TgtdZoIeGh@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78418-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78418-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: 2016-11/txt/msg02317.txt.bz2
Content-length: 881

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
   Target Milestone|---                         |7.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
   Target Milestone|---                         |7.0

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
>From gcc-bugs-return-544282-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 04:42:12 2016
Return-Path: <gcc-bugs-return-544282-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 100395 invoked by alias); 21 Nov 2016 04:42:11 -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 100217 invoked by uid 55); 21 Nov 2016 04:41:58 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug objc++/78418] [7 Regression] Several failures in the obj-c++ test suite after revision r242377 on x86_64-apple-darwin16
Date: Mon, 21 Nov 2016 05:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: objc++
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason 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-78418-4-cifg4wptUq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78418-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78418-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: 2016-11/txt/msg02316.txt.bz2
Content-length: 439

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Mon Nov 21 04:41:21 2016
New Revision: 242647

URL: https://gcc.gnu.org/viewcvs?rev=242647&root=gcc&view=rev
Log:
        PR objc++/78418 - ICE in string tests on darwin

        * tree.c (lvalue_kind): Guard DECL_HAS_VALUE_EXPR_P.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
>From gcc-bugs-return-544284-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 05:03:18 2016
Return-Path: <gcc-bugs-return-544284-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14413 invoked by alias); 21 Nov 2016 05:03: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 14270 invoked by uid 48); 21 Nov 2016 05:03:05 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug objc++/78418] [7 Regression] Several failures in the obj-c++ test suite after revision r242377 on x86_64-apple-darwin16
Date: Mon, 21 Nov 2016 05:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: objc++
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution assigned_to target_milestone
Message-ID: <bug-78418-4-2SLhS8iLcr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78418-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78418-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: 2016-11/txt/msg02318.txt.bz2
Content-length: 881

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
   Target Milestone|---                         |7.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
   Target Milestone|---                         |7.0

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
>From gcc-bugs-return-544285-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 05:33:40 2016
Return-Path: <gcc-bugs-return-544285-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 63541 invoked by alias); 21 Nov 2016 05:33:40 -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 53753 invoked by uid 48); 21 Nov 2016 05:31:03 -0000
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/48551] Following source code crashes the c++ compiler on coldfire platform.
Date: Mon, 21 Nov 2016 05:33: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: 4.5.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: law at redhat dot com
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: bug_status resolution
Message-ID: <bug-48551-4-CqBCiS65SI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-48551-4@http.gcc.gnu.org/bugzilla/>
References: <bug-48551-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: 2016-11/txt/msg02319.txt.bz2
Content-length: 450

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

Jeffrey A. Law <law at redhat dot com> changed:

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

--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Fixed via reload change on the trunk.
>From gcc-bugs-return-544286-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 05:33:41 2016
Return-Path: <gcc-bugs-return-544286-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 64090 invoked by alias); 21 Nov 2016 05:33:40 -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 53251 invoked by uid 55); 21 Nov 2016 05:30:23 -0000
From: "law at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/48551] Following source code crashes the c++ compiler on coldfire platform.
Date: Mon, 21 Nov 2016 05:54: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: 4.5.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: law 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-48551-4-1HrJh5khh5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-48551-4@http.gcc.gnu.org/bugzilla/>
References: <bug-48551-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: 2016-11/txt/msg02320.txt.bz2
Content-length: 907

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

--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Mon Nov 21 05:29:36 2016
New Revision: 242648

URL: https://gcc.gnu.org/viewcvs?rev=242648&root=gcc&view=rev
Log:
2016-11-20  Jeff Law  <law@redhat.com>

        PR target/48551
        * reload.h (struct target_reload): Make x_double_reg_address_ok
        be per-mode rather.
        * reload.c (find_reloads_address): Check if double_reg_address_ok
        is true for the mode of the memory reference.
        * reload1.c (init_reload): Initialize double_reg_address_ok for
        each mode.

        PR target/48551
        * gcc.target/m68k/pr48551.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/m68k/pr48551.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/reload.c
    trunk/gcc/reload.h
    trunk/gcc/reload1.c
    trunk/gcc/testsuite/ChangeLog
>From gcc-bugs-return-544287-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 05:54:33 2016
Return-Path: <gcc-bugs-return-544287-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 108028 invoked by alias); 21 Nov 2016 05:54:33 -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 107884 invoked by uid 48); 21 Nov 2016 05:54:19 -0000
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/69455] [5/6/7 Regression] [F08] Assembler error(s) when using intrinsic modules in two BLOCK
Date: Mon, 21 Nov 2016 08:10: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: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dominiq at lps dot ens.fr
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-69455-4-MguzzShxaw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-69455-4@http.gcc.gnu.org/bugzilla/>
References: <bug-69455-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: 2016-11/txt/msg02321.txt.bz2
Content-length: 347

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

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> A two line patch (or one rather long line) is sufficient to work
> around the brokeness of the intrinsics modules.

"Un qui sait vaut mieux que dix qui cherchent!" Could you please be kind enough
to post the patch?
>From gcc-bugs-return-544288-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:10:14 2016
Return-Path: <gcc-bugs-return-544288-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 48810 invoked by alias); 21 Nov 2016 08:10:13 -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 47241 invoked by uid 48); 21 Nov 2016 08:09:56 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
Date: Mon, 21 Nov 2016 08:10:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou 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 everconfirmed
Message-ID: <bug-78437-4-XV8T0baWq7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78437-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78437-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: 2016-11/txt/msg02322.txt.bz2
Content-length: 708

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Alpha is the only architecture both affected by PR rtl-optimization/59461 and
enabling REE at -O2, but I presume that this could happen on others too.
>From gcc-bugs-return-544289-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:10:33 2016
Return-Path: <gcc-bugs-return-544289-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 49620 invoked by alias); 21 Nov 2016 08:10:33 -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 49420 invoked by uid 48); 21 Nov 2016 08:10:19 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
Date: Mon, 21 Nov 2016 08:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to target_milestone
Message-ID: <bug-78437-4-z8fgCyZ7rr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78437-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78437-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: 2016-11/txt/msg02323.txt.bz2
Content-length: 524

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ebotcazou at gcc dot gnu.org
   Target Milestone|---                         |7.0

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Investigating.
>From gcc-bugs-return-544290-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:16:06 2016
Return-Path: <gcc-bugs-return-544290-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27837 invoked by alias); 21 Nov 2016 08:16:06 -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 6153 invoked by uid 48); 21 Nov 2016 08:15:53 -0000
From: "perini at wisc dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/78443] New: Incorrect behavior with non_overridable keyword
Date: Mon, 21 Nov 2016 08:37:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 6.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: perini at wisc dot edu
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created
Message-ID: <bug-78443-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: 2016-11/txt/msg02324.txt.bz2
Content-length: 1830

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

            Bug ID: 78443
           Summary: Incorrect behavior with non_overridable keyword
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: perini at wisc dot edu
  Target Milestone: ---

Created attachment 40094
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40094&action=edit
Minimal program to test the non_overridable keyword issue

Hi, 

I've been having some issues recently when using the non_overridable keyword on
an extended derived type, with gfortran 5.3.0 and 6.1.0. 

In essence, when the non_overridable function is called from: 
- A type which extends an abstract type -> segmentation fault (looks like call
to null function pointer);
- A type which extends a non-abstract type -> call the parent's function
instead than the own function.

"Modern Fortran" by Metcalf Reid Cohen states: 
- If the non_overridable attribute appears, that type-bound procedure cannot be
overridden during type extension; 
- non_overridable is incompatible with deferred, since that requires the
type-bound procedure to be overridden; 
- Overriding a type-bound procedure is not permitted if the inherited one has
the non_overridable attribute

So I'm guessing that using the non_overridable keyword in a non-abstract
extended type should be OK and prevent the function being overridden in further
type extensions. A bit more discussion has taken place in
http://stackoverflow.com/questions/40510423/segmentation-fault-with-deferred-functions-and-non-overridable-keyword

The attached code reproduces the error.

Thanks for the great work on gfortran!

Federico
>From gcc-bugs-return-544291-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:37:59 2016
Return-Path: <gcc-bugs-return-544291-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 69102 invoked by alias); 21 Nov 2016 08:37: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 68902 invoked by uid 48); 21 Nov 2016 08:37:46 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78438] [7 Regression] incorrect comparison optimization
Date: Mon, 21 Nov 2016 08:44: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-78438-4-dMENgZZup2@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78438-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78438-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: 2016-11/txt/msg02325.txt.bz2
Content-length: 1018

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |7.0
            Summary|incorrect comparison        |[7 Regression] incorrect
                   |optimization                |comparison optimization
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r242414.
Simplified testcase:
char a = 0;
int b = 197412621;

__attribute__ ((noinline, noclone))
void foo ()
{
  a = 0 > (short) (b >> 11);
}

int
main ()
{
  asm volatile ("" : : : "memory");
  foo ();
  if (a != 0)
    __builtin_abort ();
  return 0;
}
>From gcc-bugs-return-544292-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:44:05 2016
Return-Path: <gcc-bugs-return-544292-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 80183 invoked by alias); 21 Nov 2016 08:44: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 79933 invoked by uid 48); 21 Nov 2016 08:43:50 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78438] [7 Regression] incorrect comparison optimization
Date: Mon, 21 Nov 2016 08:47: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78438-4-eO4Hk5KtLm@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78438-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78438-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: 2016-11/txt/msg02326.txt.bz2
Content-length: 1385

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Before combine we have:
(insn 6 5 7 2 (parallel [
            (set (reg:SI 92)
                (ashiftrt:SI (reg:SI 93 [ b ])
                    (const_int 11 [0xb])))
            (clobber (reg:CC 17 flags))
        ]) "pr78438.c":7 563 {*ashrsi3_1}
     (expr_list:REG_DEAD (reg:SI 93 [ b ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_EQUAL (ashiftrt:SI (mem/c:SI (symbol_ref:DI ("b")
[flags 0x2]  <var_decl 0x7f8ffbb66ea0 b>) [1 b+0 S4 A32])
                    (const_int 11 [0xb]))
                (nil)))))
(insn 7 6 8 2 (parallel [
            (set (reg:HI 94)
                (lshiftrt:HI (subreg:HI (reg:SI 92) 0)
                    (const_int 15 [0xf])))
            (clobber (reg:CC 17 flags))
        ]) "pr78438.c":7 572 {*lshrhi3_1}
     (expr_list:REG_DEAD (reg:SI 92)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))
combine turns that into non-equivalent:
(insn 7 6 8 2 (parallel [
            (set (reg:SI 94)
                (ashiftrt:SI (reg:SI 93 [ b ])
                    (const_int 26 [0x1a])))
            (clobber (reg:CC 17 flags))
        ]) "pr78438.c":7 563 {*ashrsi3_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (expr_list:REG_DEAD (reg:SI 93 [ b ])
            (nil))))
>From gcc-bugs-return-544293-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:47:51 2016
Return-Path: <gcc-bugs-return-544293-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 84660 invoked by alias); 21 Nov 2016 08:47:51 -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 84529 invoked by uid 48); 21 Nov 2016 08:47:38 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78426] [7 Regression] wrong code with strncmp on SH
Date: Mon, 21 Nov 2016 08:53: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-78426-4-R0JV0mSWg4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78426-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78426-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: 2016-11/txt/msg02327.txt.bz2
Content-length: 293

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |7.0
>From gcc-bugs-return-544294-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:53:40 2016
Return-Path: <gcc-bugs-return-544294-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 120739 invoked by alias); 21 Nov 2016 08:53:40 -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 120490 invoked by uid 48); 21 Nov 2016 08:53:27 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78427] missed optimization of loop condition
Date: Mon, 21 Nov 2016 08:56: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: 6.2.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: keywords bug_status cf_reconfirmed_on cc component everconfirmed cf_known_to_fail
Message-ID: <bug-78427-4-sfI9bzGq2S@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78427-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78427-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: 2016-11/txt/msg02328.txt.bz2
Content-length: 939

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|                            |amker.cheng at gmail dot com
          Component|c++                         |tree-optimization
     Ever confirmed|0                           |1
      Known to fail|                            |7.0

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  IVOPTs job in this case (it's not simple loop reversal).  Basically
what is missing is a candidate for the desired IV, hopefully costs would then
make that the cheapest in the end.
>From gcc-bugs-return-544295-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:56:37 2016
Return-Path: <gcc-bugs-return-544295-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 127873 invoked by alias); 21 Nov 2016 08:56:37 -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 127223 invoked by uid 48); 21 Nov 2016 08:56:20 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
Date: Mon, 21 Nov 2016 08:57: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: 6.2.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 5.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_known_to_work version keywords cf_reconfirmed_on everconfirmed short_desc target_milestone cf_known_to_fail
Message-ID: <bug-78428-4-Q3ozjbT7Nj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78428-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78428-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: 2016-11/txt/msg02329.txt.bz2
Content-length: 1072

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.9.4
            Version|unknown                     |6.2.1
           Keywords|                            |wrong-code
   Last reconfirmed|                            |2016-11-21
     Ever confirmed|0                           |1
            Summary|wrong code at -O2 and -O3   |[5/6/7 Regression] wrong
                   |on x86_64-linux-gnu in      |code at -O2 and -O3 on
                   |64-bit mode                 |x86_64-linux-gnu in 64-bit
                   |                            |mode
   Target Milestone|---                         |5.5
      Known to fail|                            |5.4.0, 7.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  GCC 6 seems to work for me.
>From gcc-bugs-return-544296-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:57:44 2016
Return-Path: <gcc-bugs-return-544296-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129367 invoked by alias); 21 Nov 2016 08:57:43 -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 129185 invoked by uid 48); 21 Nov 2016 08:57:30 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78429] [7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 08:59: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on component cf_known_to_work target_milestone short_desc everconfirmed
Message-ID: <bug-78429-4-8QKqHlOQRo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02330.txt.bz2
Content-length: 1161

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
          Component|c                           |tree-optimization
      Known to work|                            |6.2.0
   Target Milestone|---                         |7.0
            Summary|ice on valid C code on      |[7 Regression] ice on valid
                   |x86_64-linux-gnu at -O3 in  |C code on x86_64-linux-gnu
                   |both 32-bit and 64-bit      |at -O3 in both 32-bit and
                   |modes (internal compiler    |64-bit modes (internal
                   |error: in set_value_range,  |compiler error: in
                   |at tree-vrp.c:361)          |set_value_range, at
                   |                            |tree-vrp.c:361)
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
>From gcc-bugs-return-544297-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 08:59:25 2016
Return-Path: <gcc-bugs-return-544297-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20677 invoked by alias); 21 Nov 2016 08: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 20455 invoked by uid 48); 21 Nov 2016 08:59:12 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/78430] libstc++-v3 Build failed
Date: Mon, 21 Nov 2016 09:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 6.2.0
X-Bugzilla-Keywords: build
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: keywords cf_gcctarget cf_gcchost
Message-ID: <bug-78430-4-B61Ir69rx5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78430-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78430-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: 2016-11/txt/msg02331.txt.bz2
Content-length: 551

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
             Target|                            |mips-elf
               Host|                            |x86_64-linux

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
You can --disable-libcc1 at configure time, it's only used by gdb.
>From gcc-bugs-return-544298-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:03:06 2016
Return-Path: <gcc-bugs-return-544298-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28829 invoked by alias); 21 Nov 2016 09:03:06 -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 28628 invoked by uid 48); 21 Nov 2016 09:02:53 -0000
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78444] New: Wrong prologue stack alignment for implicit dtor on x86_64-darwin*
Date: Mon, 21 Nov 2016 09:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: iains 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created
Message-ID: <bug-78444-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: 2016-11/txt/msg02332.txt.bz2
Content-length: 3874

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

            Bug ID: 78444
           Summary: Wrong prologue stack alignment for implicit dtor on
                    x86_64-darwin*
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40095
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40095&action=edit
stand-alone reproducer (c++11)

-std=c++11 -fno-exceptions -fno-rtti

In this code, there's an implict dtor which calls a base class dtor.  The stack
is incorrectly aligned at the call to the second dtor (leading to dyld
complaining and aborting the code).

        .globl __ZN4llvm2cl6parserIjED1Ev
        .weak_definition __ZN4llvm2cl6parserIjED1Ev
__ZN4llvm2cl6parserIjED1Ev:
LFB15:
        pushq   %rbp
LCFI21:
        movq    %rsp, %rbp
LCFI22:
        subq    $8, %rsp
        movq    %rdi, -8(%rbp)
        movq    -8(%rbp), %rax
        movq    %rax, %rdi
        call    __ZN4llvm2cl12basic_parserIjED2Ev
        leave
LCFI23:
        ret
LFE15:

=====

AFAICT has been present since c++11 introduction in 4.7 (so seems to be an
infrequently triggered issue).

I can't see any particular reason why this is Darwin-specific (the x86_64 code
in the back end has very little Darwin conditional code).  However, it looks
like Linux clones the dtor (_ZN4llvm2cl6parserIjED2Ev) and generates correct
prologue code for that.  So it's not clear if this is Darwin-specific, or just
that the fail conditions are only triggered for Darwin.

Looking at the tree dumps, the dtors look like regular weak hidden functions.

====

Looking at the incoming state to ix86_expand_prologue, it seems that the
function is expecting the stack_alignment_needed to be already set to a valid
amount.

with some debug code at the entry of ix86_expand_prologue():
$ ./prev-gcc/xg++ -Bprev-gcc -fno-exceptions -fno-rtti
/Volumes/sc3_src/test-cxx/prologue-x86-64-bug.C -S
_ZN4llvm2cl6OptionD2Ev : is leaf Y incoming 128 set align_needed 64 realign N
_ZN4llvm2cl12basic_parserIjED2Ev : is leaf Y incoming 128 set align_needed 64
realign N
_ZN4llvm2cl12basic_parserIjED1Ev : is leaf Y incoming 128 set align_needed 64
realign N
_ZN4llvm2cl3optIjLb0ENS0_6parserIjEEE16handleOccurrenceEjNS_9StringRefES5_ : is
leaf Y incoming 128 set align_needed 64 realign N
_ZNK4llvm2cl3optIjLb0ENS0_6parserIjEEE16printOptionValueEjb : is leaf Y
incoming 128 set align_needed 64 realign N
_ZN4llvm2cl6parserIjED1Ev : is leaf N incoming 128 set align_needed 64 realign
N
_ZN4llvm2cl3optIjLb0ENS0_6parserIjEEED1Ev : is leaf N incoming 128 set
align_needed 128 realign N
_ZN4llvm2cl3optIjLb0ENS0_6parserIjEEED0Ev : is leaf N incoming 128 set
align_needed 128 realign N

Notice that _ZN4llvm2cl6parserIjED1Ev is not a leaf function, but only claims
to need 64b alignment.

If I hack the following into ix86_finalize_stack_realign_flags()

  if (TARGET_MACHO && TARGET_64BIT && !crtl->is_leaf)
    {
        /* Darwin needs at least 128b alignment at function calls.  */
        crtl->stack_alignment_needed = crtl->stack_alignment_needed < 128
                                     ? 128
                                     : crtl->stack_alignment_needed;
        crtl->preferred_stack_boundary = crtl->preferred_stack_boundary < 128
                                       ? 128
                                       : crtl->preferred_stack_boundary;
    }

it works around the issue.

So the questions are;
1. are preceding phases (e.g. cfgexpand) supposed to make target callbacks that
get this right?
2. is something missing in the pro/epilogue that's supposed to detect this case
and fix it up?
>From gcc-bugs-return-544299-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:04:14 2016
Return-Path: <gcc-bugs-return-544299-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30277 invoked by alias); 21 Nov 2016 09:04:14 -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 30072 invoked by uid 48); 21 Nov 2016 09:04:01 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 09:06: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-78436-4-IQ6lwvrX4w@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02333.txt.bz2
Content-length: 1350

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |ktkachov at gcc dot gnu.org
   Target Milestone|---                         |7.0
            Summary|incorrect write to          |[7 Regression] incorrect
                   |larger-than-type bitfield   |write to larger-than-type
                   |(signed char x:9)           |bitfield (signed char x:9)
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with the introduction of the store merging pass: r241649.
struct S {
  long int : 23;
  long int a : 24;
  long int b : 10;
  long int c : 24;
  signed char d : 9;
} s;

__attribute__((noinline, noclone)) void
foo ()
{
  s.d = 0;
  s.c = -1193165L;
}

int
main ()
{
  foo ();
  if (s.d != 0)
    __builtin_abort ();
  return 0;
}

store-merging pass turns:
  s.d = 0;
  s.c = -1193165;
into:
  MEM[(struct S *)&s + 8B] = 4293774131;
>From gcc-bugs-return-544300-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:06:50 2016
Return-Path: <gcc-bugs-return-544300-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 59089 invoked by alias); 21 Nov 2016 09:06: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 38110 invoked by uid 48); 21 Nov 2016 09:06:37 -0000
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78444] Wrong prologue stack alignment for implicit dtor on x86_64-darwin*
Date: Mon, 21 Nov 2016 09:07: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: iains 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: keywords cf_gcctarget bug_status cf_reconfirmed_on everconfirmed cf_known_to_fail
Message-ID: <bug-78444-4-tLRI4TMgt7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78444-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78444-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: 2016-11/txt/msg02334.txt.bz2
Content-length: 666

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Target|                            |x86_64-apple-darwin*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
     Ever confirmed|0                           |1
      Known to fail|                            |4.7.4, 4.8.5, 4.9.4, 5.4.0,
                   |                            |6.2.0, 7.0
>From gcc-bugs-return-544301-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:07:43 2016
Return-Path: <gcc-bugs-return-544301-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 73145 invoked by alias); 21 Nov 2016 09:07:43 -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 73042 invoked by uid 48); 21 Nov 2016 09:07:30 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 09:11: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: assigned_to
Message-ID: <bug-78436-4-KSSZ5685Ds@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02335.txt.bz2
Content-length: 404

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

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'll have a look.
>From gcc-bugs-return-544302-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:11:27 2016
Return-Path: <gcc-bugs-return-544302-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8913 invoked by alias); 21 Nov 2016 09:11:27 -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 8745 invoked by uid 48); 21 Nov 2016 09:11:14 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78435] bogus array subscript warning
Date: Mon, 21 Nov 2016 09:16: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: 7.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
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 component resolution
Message-ID: <bug-78435-4-GzpwD5QAmG@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78435-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78435-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: 2016-11/txt/msg02336.txt.bz2
Content-length: 1223

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |RESOLVED
          Component|middle-end                  |tree-optimization
         Resolution|---                         |INVALID

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_generic_expr (ref)
work[98]

<bb 26>:
_40 = strlen (&work);
_41 = (unsigned int) _40;
_42 = _41 + 1;
size_43 = (int) _42;
if (size_43 > 99)
  goto <bb 27>;
else
  goto <bb 35>;

<bb 27>:
size_65 = ASSERT_EXPR <size_43, size_43 > 99>;
work[98] = 0;


Before inlining (knowing buffersize == 99) we have

  <bb 18>:
  _10 = strlen (&work);
  _11 = (unsigned int) _10;
  _12 = _11 + 1;
  size_48 = (int) _12;
  if (size_48 > buffersize_49(D))
    goto <bb 19>;
  else
    goto <bb 20>;

  <bb 19>:
  _13 = buffersize_49(D) + -1;
  work[_13] = 0;

but 'work' is [0, 27].  So clearly the code is bogus (even if we warn on dead
code).
>From gcc-bugs-return-544303-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:16:05 2016
Return-Path: <gcc-bugs-return-544303-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25049 invoked by alias); 21 Nov 2016 09:16: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 24910 invoked by uid 48); 21 Nov 2016 09:15:52 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 09:17: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78436-4-usENP7CMGG@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02337.txt.bz2
Content-length: 297

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, maybe it's DECL_SIZE (of the FIELD_DECL) vs. TYPE_PRECISION mismatch not
honored by store merging (I can very well think of other places having the
same confusion...).
>From gcc-bugs-return-544304-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:17:07 2016
Return-Path: <gcc-bugs-return-544304-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26939 invoked by alias); 21 Nov 2016 09:17:07 -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 26574 invoked by uid 48); 21 Nov 2016 09:16:54 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)
Date: Mon, 21 Nov 2016 09:25: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-78439-4-f65A3Pf5pu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78439-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: 2016-11/txt/msg02338.txt.bz2
Content-length: 293

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |7.0
>From gcc-bugs-return-544305-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:25:25 2016
Return-Path: <gcc-bugs-return-544305-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 80833 invoked by alias); 21 Nov 2016 09:25: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 80494 invoked by uid 48); 21 Nov 2016 09:25:20 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78438] [7 Regression] incorrect comparison optimization
Date: Mon, 21 Nov 2016 09:28: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status
Message-ID: <bug-78438-4-QSfqbOItZ4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78438-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78438-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: 2016-11/txt/msg02339.txt.bz2
Content-length: 716

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The over-sized bitfield isn't really needed for this, making it more severe:
struct S {
  long int : 23;
  long int a : 24;
  long int b : 10;
  long int c : 24;
  signed char d : 8;
} s;

__attribute__((noinline, noclone)) void
foo ()
{
  s.d = 0;
  s.c = -1193165L;
}

int
main ()
{
  foo ();
  if (s.d != 0)
    __builtin_abort ();
  return 0;
}
>From gcc-bugs-return-544306-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:28:27 2016
Return-Path: <gcc-bugs-return-544306-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 90308 invoked by alias); 21 Nov 2016 09:28:27 -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 90173 invoked by uid 48); 21 Nov 2016 09:28:14 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 09:33: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78436-4-OYZxvZlbPk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02340.txt.bz2
Content-length: 406

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

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Assignment of negative values to signed bitfields has caused me some headaches
in encode_tree_to_bitpos due to native_encode_expr sign-extending the value to
GET_MODE_SIZE (TYPE_MODE (...)) bytes, making it necessary to truncate the
excess padding introduced. Maybe there's a but g in that logic
>From gcc-bugs-return-544307-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:33:16 2016
Return-Path: <gcc-bugs-return-544307-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 98082 invoked by alias); 21 Nov 2016 09:33:16 -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 97894 invoked by uid 48); 21 Nov 2016 09:33:03 -0000
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78445] New: [7 Regression] ICE in maybe_gen_insn, at optabs.c:7014
Date: Mon, 21 Nov 2016 09:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: asolokha at gmx 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget
Message-ID: <bug-78445-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: 2016-11/txt/msg02341.txt.bz2
Content-length: 1099

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

            Bug ID: 78445
           Summary: [7 Regression] ICE in maybe_gen_insn, at optabs.c:7014
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc-7.0.0-alpha20161120 snapshot ICEs when compiling the following reduced
snippet w/ -O2 (-O3, -Ofast) -mavx2 -ftree-loop-if-convert -ftree-vectorize:

int gp;

void
s3 (int io)
{
  int *nz = gp;

  while (gp != 0)
    if (io != 0)
      {
        *nz = gp;
        io = *nz;
      }
    else
      io = gp;
}

% x86_64-pc-linux-gnu-gcc-7.0.0-alpha20161120 -mavx2 -O2 -ftree-loop-if-convert
-ftree-vectorize -w -c hwbr0lsy.c
hwbr0lsy.c: In function 's3':
hwbr0lsy.c:11:13: internal compiler error: in maybe_gen_insn, at optabs.c:7014
         *nz = gp;
         ~~~~^~~~
>From gcc-bugs-return-544308-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:36:02 2016
Return-Path: <gcc-bugs-return-544308-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 106453 invoked by alias); 21 Nov 2016 09:36:02 -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 106184 invoked by uid 48); 21 Nov 2016 09:35:49 -0000
From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
Date: Mon, 21 Nov 2016 09:41: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vogt at linux dot vnet.ibm.com
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78433-4-7vYIJVtC05@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78433-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78433-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: 2016-11/txt/msg02342.txt.bz2
Content-length: 168

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

--- Comment #5 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
Is that with any specific version of Glibc?
>From gcc-bugs-return-544309-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:41:10 2016
Return-Path: <gcc-bugs-return-544309-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 124043 invoked by alias); 21 Nov 2016 09:41:10 -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 123706 invoked by uid 48); 21 Nov 2016 09:40:56 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78438] [7 Regression] incorrect comparison optimization
Date: Mon, 21 Nov 2016 09:41: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status
Message-ID: <bug-78438-4-1lroj9pQdE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78438-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78438-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: 2016-11/txt/msg02343.txt.bz2
Content-length: 389

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Oops, #c3 was meant for PR78436.
>From gcc-bugs-return-544310-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:41:50 2016
Return-Path: <gcc-bugs-return-544310-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 125200 invoked by alias); 21 Nov 2016 09:41: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 125098 invoked by uid 48); 21 Nov 2016 09:41:42 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 09:46: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78436-4-3eKKCNO2Tc@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02344.txt.bz2
Content-length: 559

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The over-sized bitfield isn't really needed for this, making it more severe:
struct S {
  long int : 23;
  long int a : 24;
  long int b : 10;
  long int c : 24;
  signed char d : 8;
} s;

__attribute__((noinline, noclone)) void
foo ()
{
  s.d = 0;
  s.c = -1193165L;
}

int
main ()
{
  foo ();
  if (s.d != 0)
    __builtin_abort ();
  return 0;
}

Indeed, I think the bug is in encode_tree_to_bitpos, still debugging where
exactly.
>From gcc-bugs-return-544311-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:46:21 2016
Return-Path: <gcc-bugs-return-544311-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 130702 invoked by alias); 21 Nov 2016 09:46:21 -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 130593 invoked by uid 48); 21 Nov 2016 09:46:08 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)
Date: Mon, 21 Nov 2016 09:54: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-78439-4-wYErKWNpr4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78439-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: 2016-11/txt/msg02345.txt.bz2
Content-length: 548

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|                            |ktkachov at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed.
Will try to reduce
>From gcc-bugs-return-544312-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:54:02 2016
Return-Path: <gcc-bugs-return-544312-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11578 invoked by alias); 21 Nov 2016 09:54: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 11392 invoked by uid 48); 21 Nov 2016 09:53:49 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
Date: Mon, 21 Nov 2016 09:56: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: 7.0
X-Bugzilla-Keywords: wrong-code
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78433-4-sNpfi3Je04@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78433-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78433-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: 2016-11/txt/msg02346.txt.bz2
Content-length: 237

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

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Dominik Vogt from comment #5)
> Is that with any specific version of Glibc?

I was using trunk.
>From gcc-bugs-return-544313-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:56:53 2016
Return-Path: <gcc-bugs-return-544313-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18878 invoked by alias); 21 Nov 2016 09:56: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 18690 invoked by uid 48); 21 Nov 2016 09:56:39 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 09:57: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status component
Message-ID: <bug-78436-4-BgW0LNx1C4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02347.txt.bz2
Content-length: 362

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
          Component|target                      |tree-optimization
>From gcc-bugs-return-544314-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 09:57:46 2016
Return-Path: <gcc-bugs-return-544314-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19957 invoked by alias); 21 Nov 2016 09:57: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 19874 invoked by uid 48); 21 Nov 2016 09:57:41 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
Date: Mon, 21 Nov 2016 10:04: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: 7.0
X-Bugzilla-Keywords: wrong-code
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78433-4-5mH8Eebcal@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78433-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78433-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: 2016-11/txt/msg02348.txt.bz2
Content-length: 306

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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
To reproduce build glibc with -O3 and then run "make check".

Or directly:
 ~ % ~/glibc_build/elf/ld.so --library-path /home/trippels/glibc_build/
~/glibc_build/posix/tst-vfork3
>From gcc-bugs-return-544315-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:04:07 2016
Return-Path: <gcc-bugs-return-544315-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 74708 invoked by alias); 21 Nov 2016 10:04:07 -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 74395 invoked by uid 48); 21 Nov 2016 10:03:53 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)
Date: Mon, 21 Nov 2016 10:07: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78439-4-uWIwsM4mQM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78439-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: 2016-11/txt/msg02349.txt.bz2
Content-length: 1074

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

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Reduced testcase:

enum demangle_component_type
{
  DEMANGLE_COMPONENT_THROW_SPEC
};
struct demangle_component
{
  enum demangle_component_type type;
  struct
  {
    struct
    {
      struct demangle_component *left;
      struct demangle_component *right;
    };
  };
};
int a, b;

struct d_info
{
  struct demangle_component *comps;
  int next_comp;
  int num_comps;
  struct demangle_component *subs;
  int num_subs;
  int is_conversion;
};

void
fn1 (int p1, struct d_info *p2)
{
  p2->num_comps = 2 * p1;
  p2->next_comp = p2->num_subs = p1;
  p2->is_conversion = 0;
}

int fn3 (int *);
void fn4 (struct d_info *, int);

void
fn2 ()
{
  int c;
  struct d_info d;
  b = 0;
  c = fn3 (&a);
  fn1 (c, &d);
  struct demangle_component e[d.num_comps];
  struct demangle_component *f[d.num_subs];
  d.comps = e;
  d.subs = f;
  fn4 (&d, 1);
}

Command line to reproduce:
-O2 -march=armv7-a  -mfpu=vfpv3-d16 -mfloat-abi=hard -mtune=cortex-a8
>From gcc-bugs-return-544316-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:07:14 2016
Return-Path: <gcc-bugs-return-544316-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 99297 invoked by alias); 21 Nov 2016 10:07:14 -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 99198 invoked by uid 48); 21 Nov 2016 10:07:05 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
Date: Mon, 21 Nov 2016 10:11: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-78436-4-u7yzbbl94d@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78436-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: 2016-11/txt/msg02350.txt.bz2
Content-length: 559

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 40096
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40096&action=edit
gcc7-pr78436.patch

Untested fix.  Most of the changes are just nits I ran into when debugging,
the real fix is that byte_size is apparently intentionally 1 byte larger than
the mode size, so that shifting by 0 to BITS_PER_UNIT - 1 has the extra byte to
shift into.  But when not shifting, we IMHO need to subtract that extra + 1
back.
>From gcc-bugs-return-544317-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:11:20 2016
Return-Path: <gcc-bugs-return-544317-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 116406 invoked by alias); 21 Nov 2016 10:11:20 -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 110052 invoked by uid 48); 21 Nov 2016 10:11:05 -0000
From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
Date: Mon, 21 Nov 2016 10:19: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vogt at linux dot vnet.ibm.com
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78433-4-dAvakKwZhH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78433-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78433-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: 2016-11/txt/msg02351.txt.bz2
Content-length: 670

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

--- Comment #8 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
This code from maybe_script_execute() writes past the allocated array bounds:

  /* Construct an argument list for the shell. */
  char *new_argv[argc + 1];
                 ^^^^^^^^
  new_argv[0] = (char *) _PATH_BSHELL;
  new_argv[1] = (char *) file;
  if (argc > 1)
    memcpy (new_argv + 2, argv + 1, argc * sizeof(char *));
                    ^^^^^          ^^^^^^
  else
    new_argv[2] = NULL;
            ^^^

Before the patch, Gcc often allocated several bytes more than necessary so that
many off-by-one bugs went unnoticed.
>From gcc-bugs-return-544318-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:19:59 2016
Return-Path: <gcc-bugs-return-544318-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31915 invoked by alias); 21 Nov 2016 10:19: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 31747 invoked by uid 48); 21 Nov 2016 10:19:46 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/47877] -fvisibility-inlines-hidden does not hide member template functions
Date: Mon, 21 Nov 2016 10:31: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.5.2
X-Bugzilla-Keywords: documentation
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: keywords bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-47877-4-c5I8Kjyj1i@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-47877-4@http.gcc.gnu.org/bugzilla/>
References: <bug-47877-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: 2016-11/txt/msg02352.txt.bz2
Content-length: 1826

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |documentation
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|rguenther at suse dot de           |jason at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  It looks like template instantiation somehow ends up using the
explicitely specified visibility from the class.  When
determine_visibility_from_class is called for the template
determine_hidden_inline () is false because of the processing_template_decl
check.  So the behavior is clearly on purpose and thus a documentation
issue(?):

/* Returns true iff DECL is an inline that should get hidden visibility
   because of -fvisibility-inlines-hidden.  */

static bool
determine_hidden_inline (tree decl)
{
  return (visibility_options.inlines_hidden
          /* Don't do this for inline templates; specializations might not be
             inline, and we don't want them to inherit the hidden
             visibility.  We'll set it here for all inline instantiations.  */
          && !processing_template_decl
          && TREE_CODE (decl) == FUNCTION_DECL
          && DECL_DECLARED_INLINE_P (decl)
          && (! DECL_LANG_SPECIFIC (decl)
              || ! DECL_EXPLICIT_INSTANTIATION (decl)));
}

so the reason is along non-inline specializations (not sure why we'd want to
avoid mixed visibility here).
>From gcc-bugs-return-544319-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:31:55 2016
Return-Path: <gcc-bugs-return-544319-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 50376 invoked by alias); 21 Nov 2016 10:31: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 50262 invoked by uid 48); 21 Nov 2016 10:31:39 -0000
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78435] bogus array subscript warning
Date: Mon, 21 Nov 2016 10:37: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: 7.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marxin at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
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-78435-4-YbHWbuLKpf@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78435-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78435-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: 2016-11/txt/msg02353.txt.bz2
Content-length: 695

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

Martin Liška <marxin at gcc dot gnu.org> changed:

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
I have a simplified source code (easier to read):

char *result;

#define SIZE 100

int main()
{
  char buffer[SIZE];
  int limit = 1000000;

  __builtin_snprintf (buffer, SIZE, "%d", 12345);

  if (__builtin_strlen (buffer) > limit)
    buffer[limit] = '\0';

  result = __builtin_strdup (buffer);
}
>From gcc-bugs-return-544320-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:37:07 2016
Return-Path: <gcc-bugs-return-544320-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 57672 invoked by alias); 21 Nov 2016 10:37:06 -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 57488 invoked by uid 48); 21 Nov 2016 10:36:54 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78445] [7 Regression] ICE in maybe_gen_insn, at optabs.c:7014
Date: Mon, 21 Nov 2016 10:49: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on component target_milestone everconfirmed
Message-ID: <bug-78445-4-oqYzthwlLd@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78445-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78445-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: 2016-11/txt/msg02354.txt.bz2
Content-length: 2816

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
          Component|target                      |middle-end
   Target Milestone|---                         |7.0
     Ever confirmed|0                           |1

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Confirmed, middle-end tries (and fails) to expand scalar maskstore optab.

(gdb) bt
#0  internal_error (gmsgid=0x2232ce5 "in %s, at %s:%d") at
../../git/gcc/gcc/diagnostic.c:1379
#1  0x0000000001a44c9b in fancy_abort (file=0x1b97c60
"../../git/gcc/gcc/optabs.c", line=7013, 
    function=0x1b9800d <maybe_gen_insn(insn_code, unsigned int,
expand_operand*)::__FUNCTION__> "maybe_gen_insn")
    at ../../git/gcc/gcc/diagnostic.c:1447
#2  0x0000000000cc9110 in maybe_gen_insn (icode=CODE_FOR_nothing, nops=3,
ops=0x7fffffffc310) at ../../git/gcc/gcc/optabs.c:7013
#3  0x0000000000cc9651 in maybe_expand_insn (icode=CODE_FOR_nothing, nops=3,
ops=0x7fffffffc310) at ../../git/gcc/gcc/optabs.c:7057
#4  0x0000000000cc969b in expand_insn (icode=CODE_FOR_nothing, nops=3,
ops=0x7fffffffc310) at ../../git/gcc/gcc/optabs.c:7088
#5  0x0000000000b6e7fe in expand_mask_store_optab_fn (stmt=0x2aaaae90bb28,
optab=maskstore_optab) at ../../git/gcc/gcc/internal-fn.c:2193
#6  0x0000000000b6e820 in expand_MASK_STORE (fn=IFN_MASK_STORE,
stmt=0x2aaaae90bb28) at ../../git/gcc/gcc/internal-fn.def:91
#7  0x0000000000b6509b in expand_internal_call (fn=IFN_MASK_STORE,
stmt=0x2aaaae90bb28) at ../../git/gcc/gcc/internal-fn.c:2649
#8  0x0000000000b6511c in expand_internal_call (stmt=0x2aaaae90bb28) at
../../git/gcc/gcc/internal-fn.c:2657

(gdb) f 5
#5  0x0000000000b6e7fe in expand_mask_store_optab_fn (stmt=0x2aaaae90bb28,
optab=maskstore_optab) at ../../git/gcc/gcc/internal-fn.c:2193
2193                   3, ops);
(gdb) list
2188      create_fixed_operand (&ops[0], mem);
2189      create_input_operand (&ops[1], reg, TYPE_MODE (type));
2190      create_input_operand (&ops[2], mask, TYPE_MODE (TREE_TYPE (maskt)));
2191      expand_insn (convert_optab_handler (optab, TYPE_MODE (type),
2192                                          TYPE_MODE (TREE_TYPE (maskt))),
2193                   3, ops);
2194    }
2195
2196    static void
2197    expand_ABNORMAL_DISPATCHER (internal_fn, gcall *)
(gdb) p debug_rtx (mem)
(mem:SI (reg/v/f:DI 89 [ nz ]) [1 *nz_8+0 S4 A32])
$1 = void
(gdb) p debug_rtx (reg)
(reg:SI 88 [ prephitmp_5 ])
$2 = void
(gdb) p debug_rtx (mask)
(reg:QI 95)
$3 = void
>From gcc-bugs-return-544321-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:49:36 2016
Return-Path: <gcc-bugs-return-544321-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 78235 invoked by alias); 21 Nov 2016 10:49:36 -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 78013 invoked by uid 48); 21 Nov 2016 10:49:23 -0000
From: "rs2740 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/78446] New: Ambiguous member lookup for operator() in a function call expression treated as hard error in SFINAE context
Date: Mon, 21 Nov 2016 10:51: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: 7.0
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rs2740 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-78446-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: 2016-11/txt/msg02355.txt.bz2
Content-length: 2137

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

            Bug ID: 78446
           Summary: Ambiguous member lookup for operator() in a function
                    call expression treated as hard error in SFINAE
                    context
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Reduced from http://stackoverflow.com/q/40706399/2756719:

struct A { void operator()(); };
struct B { void operator()(); };
struct C : A, B {};

template<class T>
decltype(T()()) foo(int);

template<class> int foo(...);

using type = decltype(foo<C>(0));
using type = int;

produces:

prog.cc: In substitution of 'template<class T> decltype (T()()) foo(int) [with
T = C]':
prog.cc:10:31:   required from here
prog.cc:6:13: error: request for member 'operator()' is ambiguous
 decltype(T()()) foo(int);
          ~~~^~
prog.cc:2:17: note: candidates are: void B::operator()()
 struct B { void operator()(); };
                 ^~~~~~~~
prog.cc:1:17: note:                 void A::operator()()
 struct A { void operator()(); };
                 ^~~~~~~~
prog.cc: In substitution of 'template<class T> decltype (T()()) foo(int) [with
T = C]':
prog.cc:10:31:   required from here
prog.cc:6:13: error: request for member 'operator()' is ambiguous
 decltype(T()()) foo(int);
          ~~~^~
prog.cc:2:17: note: candidates are: void B::operator()()
 struct B { void operator()(); };
                 ^~~~~~~~
prog.cc:1:17: note:                 void A::operator()()
 struct A { void operator()(); };
                 ^~~~~~~~

(Yes, the error messages are repeated, see
http://melpon.org/wandbox/permlink/nZj4Wn9ZgFMMm63l)

Surprisingly enough, using 'decltype(T().operator()())' compiles
(http://melpon.org/wandbox/permlink/2sJ0ZGcA4ZIvqfvn), so it seems that this
doesn't affect all name lookup, only when the overloaded operator() is used by
a function call expression.
>From gcc-bugs-return-544323-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:58:01 2016
Return-Path: <gcc-bugs-return-544323-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 129990 invoked by alias); 21 Nov 2016 10:58:00 -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 129756 invoked by uid 48); 21 Nov 2016 10:57:47 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/67335] [6/7 Regression] ICE in compiling omp simd function with unused argument
Date: Mon, 21 Nov 2016 10:58: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: 6.0
X-Bugzilla-Keywords: ice-on-valid-code, openmp
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to attachments.created
Message-ID: <bug-67335-4-LkQAUvwVFL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67335-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67335-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: 2016-11/txt/msg02357.txt.bz2
Content-length: 578

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 40097
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40097&action=edit
gcc7-pr67335.patch

Untested fix.
>From gcc-bugs-return-544322-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:51:27 2016
Return-Path: <gcc-bugs-return-544322-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 92789 invoked by alias); 21 Nov 2016 10:51:27 -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 92534 invoked by uid 48); 21 Nov 2016 10:51:14 -0000
From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
Date: Mon, 21 Nov 2016 10:58: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vogt at linux dot vnet.ibm.com
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78433-4-5VyXsohrnv@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78433-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78433-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: 2016-11/txt/msg02356.txt.bz2
Content-length: 470

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

--- Comment #9 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
... and I think the buffer allocated in __execvpe() is also one byte too small:

  char buffer[path_len + file_len + 1];
  ...
  char *pend = mempcpy (buffer, p, subp - p);      <-- path_len
  *pend = '/';                                     <-- path_len + 1
  memcpy (pend + (p < subp), file, file_len + 1);  <-- path_len + file_len + 2
>From gcc-bugs-return-544324-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 10:58:26 2016
Return-Path: <gcc-bugs-return-544324-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 844 invoked by alias); 21 Nov 2016 10:58: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 691 invoked by uid 48); 21 Nov 2016 10:58:15 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)
Date: Mon, 21 Nov 2016 11:07: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78439-4-tZuL12RlsN@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78439-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: 2016-11/txt/msg02358.txt.bz2
Content-length: 206

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

--- Comment #3 from ktkachov at gcc dot gnu.org ---
The ICE happens due to r242590.
Need to figure out if it is the cause of the bug or just exposes it
>From gcc-bugs-return-544325-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:07:17 2016
Return-Path: <gcc-bugs-return-544325-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 56021 invoked by alias); 21 Nov 2016 11:07:17 -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 55353 invoked by uid 48); 21 Nov 2016 11:07:05 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3
Date: Mon, 21 Nov 2016 11: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: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status bug_file_loc resolution
Message-ID: <bug-78433-4-Zlq52foiOd@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78433-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78433-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: 2016-11/txt/msg02359.txt.bz2
Content-length: 702

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                URL|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=20847
         Resolution|---                         |INVALID

--- Comment #10 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Thanks Dominik.
Andreas has reopened the glibc bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=20847
>From gcc-bugs-return-544326-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:11:36 2016
Return-Path: <gcc-bugs-return-544326-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 61984 invoked by alias); 21 Nov 2016 11:11:36 -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 60806 invoked by uid 48); 21 Nov 2016 11:11:22 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78396] [7 regression] gcc.dg/vect/bb-slp-cond-1.c FAILs after fix for PR77848
Date: Mon, 21 Nov 2016 11:27: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: 7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: keywords
Message-ID: <bug-78396-4-b5Dm3s8dio@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78396-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78396-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: 2016-11/txt/msg02360.txt.bz2
Content-length: 2780

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Something like the following looks most reasonable (testcase needs adjustment
to scan the "vect" dump of course):

diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 35d7a3e..8c06725 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -540,6 +540,7 @@ vectorize_loops (void)
             || loop->force_vectorize)
       {
        loop_vec_info loop_vinfo, orig_loop_vinfo = NULL;
+       gimple *loop_vectorized_call = vect_loop_vectorized_call (loop);
 vectorize_epilogue:
        vect_location = find_loop_location (loop);
         if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOCATION
@@ -558,6 +559,32 @@ vectorize_epilogue:
            if (loop_constraint_set_p (loop, LOOP_C_FINITE))
              vect_free_loop_info_assumptions (loop);

+           /* If we applied if-conversion then try to vectorize the
+              BB of innermost loops.
+              ???  Ideally BB vectorization would learn to vectorize
+              control flow by applying if-conversion on-the-fly, the
+              following retains the if-converted loop body even when
+              only non-if-converted parts took part in BB vectorization.  */
+           if (loop_vectorized_call
+               && ! loop->inner)
+             {
+               basic_block bb = loop->header;
+               for (gimple_stmt_iterator gsi = gsi_start_bb (bb);
+                    !gsi_end_p (gsi); gsi_next (&gsi))
+                 {
+                   gimple *stmt = gsi_stmt (gsi);
+                   gimple_set_uid (stmt, -1);
+                   gimple_set_visited (stmt, false);
+                 }
+               if (vect_slp_bb (bb))
+                 {
+                   dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location,
+                                    "basic block vectorized\n");
+                   fold_loop_vectorized_call (loop_vectorized_call,
+                                              boolean_true_node);
+                   ret |= TODO_cleanup_cfg;
+                 }
+             }
            continue;
          }

@@ -575,7 +602,6 @@ vectorize_epilogue:
            break;
          }

-       gimple *loop_vectorized_call = vect_loop_vectorized_call (loop);
        if (loop_vectorized_call)
          set_uid_loop_bbs (loop_vinfo, loop_vectorized_call);
         if (LOCATION_LOCUS (vect_location) != UNKNOWN_LOCATION
>From gcc-bugs-return-544327-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:27:57 2016
Return-Path: <gcc-bugs-return-544327-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 80886 invoked by alias); 21 Nov 2016 11:27:57 -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 76114 invoked by uid 48); 21 Nov 2016 11:27:46 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
Date: Mon, 21 Nov 2016 11:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-78437-4-QzSePc2Y0T@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78437-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78437-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: 2016-11/txt/msg02361.txt.bz2
Content-length: 816

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

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Created attachment 40098
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40098&action=edit
Tentative fix

It only affects Alpha (by default) but I no longer have access to Alpha
hardware so I'm going to play with it on SPARC.  Its effect on the assembly
code on Alpha is:

--- pr78437_1.s 2016-11-21 11:54:33.678363106 +0100
+++ pr78437_2.s 2016-11-21 11:54:40.230542615 +0100
@@ -62,7 +62,7 @@
        ldbu $7,max($5)         !gprellow
        sextb $8,$3
        stb $8,expected($2)             !gprellow
-       mov $3,$22
+       bis $31,$8,$22
        sextb $7,$7
        cmpeq $3,$7,$3
        beq $3,$L4

FWIW the change for PR rtl-opt/59461 eliminated 2 redundant extensions.
>From gcc-bugs-return-544328-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:28:52 2016
Return-Path: <gcc-bugs-return-544328-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7458 invoked by alias); 21 Nov 2016 11:28: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 1900 invoked by uid 48); 21 Nov 2016 11:28:37 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)
Date: Mon, 21 Nov 2016 11:42: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ktkachov at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to
Message-ID: <bug-78439-4-zNPnDtFbre@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78439-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: 2016-11/txt/msg02362.txt.bz2
Content-length: 1342

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ktkachov at gcc dot gnu.org

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Hmm, this looks like a bug exposed by that patch.
The peephole2 pass does something weird.
We have:
(insn 13 33 40 2 (set (mem/c:SI (plus:SI (reg/f:SI 11 fp)
                (const_int -28 [0xffffffffffffffe4])) [3 d.num_comps+0 S4 A64])
        (reg:SI 12 ip [orig:117 _20 ] [117])) "cp-demangle.c":32 632
{*arm_movsi_vfp}
     (expr_list:REG_DEAD (reg:SI 12 ip [orig:117 _20 ] [117])
        (nil)))
(insn 40 13 39 2 (set (mem/f/c:SI (plus:SI (reg/f:SI 11 fp)
                (const_int -24 [0xffffffffffffffe8])) [2 d.subs+0 S4 A32])
        (reg/f:SI 13 sp)) "cp-demangle.c":51 632 {*arm_movsi_vfp}
     (nil))

being turned into:
(insn 68 33 39 2 (set (mem/c:DI (plus:SI (reg/f:SI 11 fp)
                (const_int -28 [0xffffffffffffffe4])) [3 d.num_comps+0 S8 A64])
        (reg:DI 12 ip)) "cp-demangle.c":51 -1
     (nil))

which is not recognisable.
Something dodgy with the store-multiple peepholes I think
>From gcc-bugs-return-544329-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:42:49 2016
Return-Path: <gcc-bugs-return-544329-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31103 invoked by alias); 21 Nov 2016 11:42: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 31007 invoked by uid 48); 21 Nov 2016 11:42:36 -0000
From: "aaz@q-fu.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/78073] inherited initializer_list constructor is not accessible
Date: Mon, 21 Nov 2016 11:45: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: aaz@q-fu.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: cc
Message-ID: <bug-78073-4-zZqssMAYgB@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78073-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78073-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: 2016-11/txt/msg02363.txt.bz2
Content-length: 528

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

Andrey Zholos <aaz@q-fu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aaz@q-fu.com

--- Comment #2 from Andrey Zholos <aaz@q-fu.com> ---
I think the below code triggers the same bug. But it seems to be fixed in
latest trunk.


// -std=c++1z

struct A {
    A(int, int) {}
};

struct B : A {
    using A::A;
};

B b{1, 2};
>From gcc-bugs-return-544330-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:45:28 2016
Return-Path: <gcc-bugs-return-544330-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 39304 invoked by alias); 21 Nov 2016 11:45: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 35783 invoked by uid 48); 21 Nov 2016 11:44:59 -0000
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/69278] Confusion option handling for -sanitize-recovery=alll
Date: Mon, 21 Nov 2016 11:47:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marxin 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-69278-4-8Mq1UFdlIG@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-69278-4@http.gcc.gnu.org/bugzilla/>
References: <bug-69278-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: 2016-11/txt/msg02364.txt.bz2
Content-length: 406

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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
I've just verified that clang 3.8.1 emits *_noabort calls with
-fsanitize-recover=all:

$ clang++ -fsanitize=address -fsanitize-recover=all /tmp/leak.c -S ; grep store
leak.s
        callq   __asan_report_store4_noabort

Thus, do we want to change the behavior for GCC 7.1?
>From gcc-bugs-return-544331-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:47:02 2016
Return-Path: <gcc-bugs-return-544331-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 58654 invoked by alias); 21 Nov 2016 11:47: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 58577 invoked by uid 48); 21 Nov 2016 11:46:55 -0000
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78447] New: [7 Regression] wrong code when combine changes shifts by << 5 and >> 15 to >> 10 at -O
Date: Mon, 21 Nov 2016 11:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: zsojka at seznam dot cz
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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild attachments.created
Message-ID: <bug-78447-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: 2016-11/txt/msg02365.txt.bz2
Content-length: 3215

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

            Bug ID: 78447
           Summary: [7 Regression] wrong code when combine changes shifts
                    by << 5 and >> 15 to >> 10 at -O
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu
             Build: x86_64-pc-linux-gnu

Created attachment 40099
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40099&action=edit
reduced testcase

Output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c
$ ./a.out
Aborted

$ x86_64-pc-linux-gnu-gcc -v           
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-242583-checking-yes-rtl-df-extra-nobootstrap-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --without-cloog --without-ppl --without-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-242583-checking-yes-rtl-df-extra-nobootstrap-nographite-amd64
Thread model: posix
gcc version 7.0.0 20161118 (experimental) (GCC) 


Before .combine:
...
(insn 9 8 10 2 (parallel [
            (set (reg:SI 108)
                (ashift:SI (reg/v:SI 105 [ xD.1799 ])
                    (const_int 5 [0x5])))
            (clobber (reg:CC 17 flags))
        ]) "testcase.c":13 529 {*ashlsi3_1}
     (expr_list:REG_DEAD (reg/v:SI 105 [ xD.1799 ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))
...

(insn 11 10 12 2 (parallel [
            (set (reg:HI 110)
                (lshiftrt:HI (subreg:HI (reg:SI 109) 0)
                    (const_int 15 [0xf])))
            (clobber (reg:CC 17 flags))
        ]) "testcase.c":15 572 {*lshrhi3_1}
     (expr_list:REG_DEAD (reg:SI 109)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))
(insn 12 11 13 2 (set (reg:QI 92 [ _11 ])
        (subreg:QI (reg:HI 110) 0)) "testcase.c":15 85 {*movqi_internal}
     (expr_list:REG_DEAD (reg:HI 110)
        (nil)))
...


.combine shows:
...
Trying 9, 11 -> 12:
...
Successfully matched this instruction:
(set (reg:SI 110)
    (lshiftrt:SI (reg/v:SI 105 [ xD.1799 ])
        (const_int 10 [0xa])))
Successfully matched this instruction:
(set (subreg:SI (reg:QI 92 [ _11 ]) 0)
    (and:SI (reg:SI 110)
        (const_int 255 [0xff])))
allowing combination of insns 9, 11 and 12
original costs 4 + 4 + 4 = 12
replacement costs 4 + 4 = 8


Which is probably wrong.


Tested revisions:
r242657 - FAIL
r242583 - FAIL
r242510 - FAIL
r242408 - OK
>From gcc-bugs-return-544332-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:50:55 2016
Return-Path: <gcc-bugs-return-544332-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 70852 invoked by alias); 21 Nov 2016 11:50: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 69733 invoked by uid 48); 21 Nov 2016 11:50:38 -0000
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78429] [7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 11:51: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marxin 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-78429-4-80JJjMVFRp@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02366.txt.bz2
Content-length: 491

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r241529.
>From gcc-bugs-return-544333-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:51:21 2016
Return-Path: <gcc-bugs-return-544333-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 72518 invoked by alias); 21 Nov 2016 11:51:20 -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 72337 invoked by uid 48); 21 Nov 2016 11:51:08 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/69278] Confusion option handling for -sanitize-recovery=alll
Date: Mon, 21 Nov 2016 11:53:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-69278-4-R1twoSGktd@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-69278-4@http.gcc.gnu.org/bugzilla/>
References: <bug-69278-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: 2016-11/txt/msg02367.txt.bz2
Content-length: 185

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Maybe llvm doesn't care about backwards compatibility, but we do.
>From gcc-bugs-return-544334-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 11:53:12 2016
Return-Path: <gcc-bugs-return-544334-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 74034 invoked by alias); 21 Nov 2016 11:53:11 -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 73915 invoked by uid 48); 21 Nov 2016 11:52:57 -0000
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78439] [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)
Date: Mon, 21 Nov 2016 12:04: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: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ktkachov at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ktkachov at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78439-4-ymhmy2kWo7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78439-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78439-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: 2016-11/txt/msg02368.txt.bz2
Content-length: 123

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

--- Comment #5 from ktkachov at gcc dot gnu.org ---
Testing a patch.
>From gcc-bugs-return-544335-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:04:31 2016
Return-Path: <gcc-bugs-return-544335-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 50232 invoked by alias); 21 Nov 2016 12:04:31 -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 41084 invoked by uid 48); 21 Nov 2016 12:04:18 -0000
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78428] [5/6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
Date: Mon, 21 Nov 2016 12:09: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: 6.2.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marxin 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: 5.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc cf_known_to_fail
Message-ID: <bug-78428-4-lHA7lJZ1jt@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78428-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78428-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: 2016-11/txt/msg02369.txt.bz2
Content-length: 932

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |marxin at gcc dot gnu.org
      Known to fail|                            |6.2.0

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
I can confirm that it fail starting with r218818.

Add -malign-data={abi|compat|cachineline}

Add -malign-data={abi|compat,cachineline} to control how GCC aligns
variables.  "compat" uses increased alignment value compatible with
GCC 4.8 and earlier, "abi" uses alignment value as specified by the
psABI, and "cacheline" uses increased alignment value to match the
cache line size.  "compat" is the default.
>From gcc-bugs-return-544337-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:23:36 2016
Return-Path: <gcc-bugs-return-544337-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 111625 invoked by alias); 21 Nov 2016 12:23:36 -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 111537 invoked by uid 48); 21 Nov 2016 12:23:31 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78429] [7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:23: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-5krGk6d79T@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02371.txt.bz2
Content-length: 1133

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

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
It looks like this guard in set_and_canonicalize_value_range:

      /* For one bit precision if max < min, then the swapped
         range covers all values, so for VR_RANGE it is varying and
         for VR_ANTI_RANGE empty range, so drop to varying as well.  */
      if (TYPE_PRECISION (TREE_TYPE (min)) == 1)
        {
          set_value_range_to_varying (vr);
          return;
        }

is bypassed because we have a rather surprising boolean type:

(gdb) p debug_tree(min)
 <integer_cst 0x7ffff6d85c90 type <boolean_type 0x7ffff6d7b888> constant 0>

(gdb) p debug_tree((tree)0x7ffff6d7b888)
 <boolean_type 0x7ffff6d7b888 public SI
    size <integer_cst 0x7ffff6c34ee8 type <integer_type 0x7ffff6c39150
bitsizetype> constant 32>
    unit size <integer_cst 0x7ffff6c34f00 type <integer_type 0x7ffff6c390a8
sizetype> constant 4>
    align 32 symtab 0 alias set -1 canonical type 0x7ffff6d7b888 precision 32
min <integer_cst 0x7ffff6d85a20 -2147483648> max <integer_cst 0x7ffff6d85bb8
2147483647>>
>From gcc-bugs-return-544336-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:09:17 2016
Return-Path: <gcc-bugs-return-544336-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 62136 invoked by alias); 21 Nov 2016 12:09:15 -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 61464 invoked by uid 48); 21 Nov 2016 12:09:02 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78437] [7 Regression]: Invalid sign-extend conversion in REE pass
Date: Mon, 21 Nov 2016 12:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78437-4-3t08yNUmiQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78437-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78437-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: 2016-11/txt/msg02370.txt.bz2
Content-length: 1003

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

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Eric Botcazou from comment #3)
> Created attachment 40098 [details]
> Tentative fix
> 
> It only affects Alpha (by default) but I no longer have access to Alpha
> hardware so I'm going to play with it on SPARC.  Its effect on the assembly
> code on Alpha is:
> 
> --- pr78437_1.s 2016-11-21 11:54:33.678363106 +0100
> +++ pr78437_2.s 2016-11-21 11:54:40.230542615 +0100
> @@ -62,7 +62,7 @@
>         ldbu $7,max($5)         !gprellow
>         sextb $8,$3
>         stb $8,expected($2)             !gprellow
> -       mov $3,$22
> +       bis $31,$8,$22
>         sextb $7,$7
>         cmpeq $3,$7,$3
>         beq $3,$L4
> 
> FWIW the change for PR rtl-opt/59461 eliminated 2 redundant extensions.

Yes this change fixes reduced testcase execution.

I have started bootstrap+regtest with your patch on alpha native. Please expect
results sometime tomorrow.
>From gcc-bugs-return-544338-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:23:59 2016
Return-Path: <gcc-bugs-return-544338-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 112584 invoked by alias); 21 Nov 2016 12:23: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 112413 invoked by uid 55); 21 Nov 2016 12:23:47 -0000
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/78093] [avr] New variable attribute "absdata" and option "-mabsdata" to enable LDS / STS on Reduced Tiny
Date: Mon, 21 Nov 2016 12:26: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: gjl at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: gjl at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78093-4-DB4QRAbF4S@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78093-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78093-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: 2016-11/txt/msg02372.txt.bz2
Content-length: 493

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

--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Author: gjl
Date: Mon Nov 21 12:23:14 2016
New Revision: 242660

URL: https://gcc.gnu.org/viewcvs?rev=242660&root=gcc&view=rev
Log:
        PR target/78093
        * config/avr/avr.c (avr_decl_maybe_lds_p): New static function.
        (avr_encode_section_info) [TARGET_ABSDATA && AVR_TINY]: Use it.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr.c
>From gcc-bugs-return-544339-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:26:22 2016
Return-Path: <gcc-bugs-return-544339-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3068 invoked by alias); 21 Nov 2016 12:26:22 -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 2912 invoked by uid 48); 21 Nov 2016 12:26:09 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [5/6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:28: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: priority component target_milestone short_desc
Message-ID: <bug-78429-4-Lxh6HGshCX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02373.txt.bz2
Content-length: 2939

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
          Component|tree-optimization           |middle-end
   Target Milestone|7.0                         |5.5
            Summary|[7 Regression] ice on valid |[5/6/7 Regression] ice on
                   |C code on x86_64-linux-gnu  |valid C code on
                   |at -O3 in both 32-bit and   |x86_64-linux-gnu at -O3 in
                   |64-bit modes (internal      |both 32-bit and 64-bit
                   |compiler error: in          |modes (internal compiler
                   |set_value_range, at         |error: in set_value_range,
                   |tree-vrp.c:361)             |at tree-vrp.c:361)

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, so

 <boolean_type 0x2aaaac16c888 public SI
    size <integer_cst 0x2aaaac025ee8 type <integer_type 0x2aaaac02a150
bitsizetype> constant 32>
    unit size <integer_cst 0x2aaaac025f00 type <integer_type 0x2aaaac02a0a8
sizetype> constant 4>
    align 32 symtab 0 alias set -1 canonical type 0x2aaaac16c888 precision 32
min <integer_cst 0x2aaaac176a20 -2147483648> max <integer_cst 0x2aaaac176bb8
2147483647>>

(look at the types min/max value).  For this rason 

(gdb) p debug_tree (min)
 <integer_cst 0x2aaaac176d98 type <boolean_type 0x2aaaac16c888> constant public
overflow -1>

is not considered is_overflow_infinity (it's not vrp_val_is_min/max).

So what is causing this is likely behavioral change of some constant folding
with respect to BOOLEAN_TYPEs.  Here

  _22 = BIT_FIELD_REF <mask__23.24_5, 32, 96>;
  _53 = (_Bool) _22;

changed behavior in force_fit_type which does:

tree
force_fit_type (tree type, const wide_int_ref &cst,
                int overflowable, bool overflowed)
{
  signop sign = TYPE_SIGN (type);

  /* If we need to set overflow flags, return a new unshared node.  */
  if (overflowed || !wi::fits_to_tree_p (cst, type))
    {
      if (overflowed
          || overflowable < 0
          || (overflowable > 0 && sign == SIGNED))
        {
          wide_int tmp = wide_int::from (cst, TYPE_PRECISION (type), sign);
          tree t = build_new_int_cst (type, tmp);
          TREE_OVERFLOW (t) = 1;
          return t;
        }

where -1 no longer "fits" bool even though it should.  So

  /* Short-circuit boolean types since various transformations assume that
     they can only take values 0 and 1.  */
  if (TREE_CODE (type) == BOOLEAN_TYPE)
    return eq_p (x, 0) || eq_p (x, 1);

is wrong and should use eq_p (x, -1) instead as bool is signed?  The
int_fits_type_p function is likely wrong as well (uses integer_onep).

The patch has been backported as well, adjusting regression marker.
>From gcc-bugs-return-544340-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:28:07 2016
Return-Path: <gcc-bugs-return-544340-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8058 invoked by alias); 21 Nov 2016 12:28:07 -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 7243 invoked by uid 48); 21 Nov 2016 12:27:54 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [5/6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:30: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-AYvrVQVWa3@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02374.txt.bz2
Content-length: 912

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's built by build_nonstandard_boolean_type via

(gdb) bt
#0  0x0000000001204281 in build_nonstandard_boolean_type (precision=32)
    at /space/rguenther/src/gcc-git/gcc/tree.c:8219
#1  0x000000000120e478 in build_truth_vector_type (nunits=4, vector_size=16)
    at /space/rguenther/src/gcc-git/gcc/tree.c:10919
#2  0x000000000118881a in get_mask_type_for_scalar_type (
    scalar_type=<integer_type 0x2aaaac02a690 int>)
    at /space/rguenther/src/gcc-git/gcc/tree-vect-stmts.c:8958
#3  0x00000000019519b2 in search_type_for_mask_1 (
    var=<ssa_name 0x2aaaac173438>, vinfo=0x28ab530, cache=...)
    at /space/rguenther/src/gcc-git/gcc/tree-vect-patterns.c:3538
#4  0x0000000001951be3 in search_type_for_mask (var=<ssa_name 0x2aaaac173438>, 
    vinfo=0x28ab530)
>From gcc-bugs-return-544341-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:30:03 2016
Return-Path: <gcc-bugs-return-544341-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10104 invoked by alias); 21 Nov 2016 12:30:02 -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 9898 invoked by uid 48); 21 Nov 2016 12:29:49 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:33: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone short_desc
Message-ID: <bug-78429-4-nIjxWxAJlo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02375.txt.bz2
Content-length: 899

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.5                         |6.3
            Summary|[5/6/7 Regression] ice on   |[6/7 Regression] ice on
                   |valid C code on             |valid C code on
                   |x86_64-linux-gnu at -O3 in  |x86_64-linux-gnu at -O3 in
                   |both 32-bit and 64-bit      |both 32-bit and 64-bit
                   |modes (internal compiler    |modes (internal compiler
                   |error: in set_value_range,  |error: in set_value_range,
                   |at tree-vrp.c:361)          |at tree-vrp.c:361)

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Wasn't backported to GCC5 (yet).
>From gcc-bugs-return-544342-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:33:41 2016
Return-Path: <gcc-bugs-return-544342-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15963 invoked by alias); 21 Nov 2016 12:33:40 -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 15843 invoked by uid 48); 21 Nov 2016 12:33:27 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78447] [7 Regression] wrong code when combine changes shifts by << 5 and >> 15 to >> 10 at -O
Date: Mon, 21 Nov 2016 12:35:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-78447-4-J8CuOB0mzC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78447-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78447-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: 2016-11/txt/msg02376.txt.bz2
Content-length: 293

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |7.0
>From gcc-bugs-return-544343-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:35:41 2016
Return-Path: <gcc-bugs-return-544343-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21829 invoked by alias); 21 Nov 2016 12:35:40 -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 17870 invoked by uid 48); 21 Nov 2016 12:35:27 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:38: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-O2a0oyyyGs@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02377.txt.bz2
Content-length: 208

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

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Wasn't backported to GCC5 (yet).

There is no plan to backport it to GCC 5 though.
>From gcc-bugs-return-544344-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:38:46 2016
Return-Path: <gcc-bugs-return-544344-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27444 invoked by alias); 21 Nov 2016 12:38: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 27303 invoked by uid 48); 21 Nov 2016 12:38:33 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:45: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-yE1EcMcLzp@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02378.txt.bz2
Content-length: 1207

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

--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> where -1 no longer "fits" bool even though it should.  So
> 
>   /* Short-circuit boolean types since various transformations assume that
>      they can only take values 0 and 1.  */
>   if (TREE_CODE (type) == BOOLEAN_TYPE)
>     return eq_p (x, 0) || eq_p (x, 1);
> 
> is wrong and should use eq_p (x, -1) instead as bool is signed?  The
> int_fits_type_p function is likely wrong as well (uses integer_onep).

Standard boolean types as unsigned though, not signed:

Index: tree.c
===================================================================
--- tree.c      (revision 242632)
+++ tree.c      (working copy)
@@ -8218,7 +8218,7 @@ build_nonstandard_boolean_type (unsigned

   type = make_node (BOOLEAN_TYPE);
   TYPE_PRECISION (type) = precision;
-  fixup_signed_type (type);
+  fixup_unsigned_type (type);

   if (precision <= MAX_INT_CACHED_PREC)
     nonstandard_boolean_type_cache[precision] = type;

fixes the ICE.
>From gcc-bugs-return-544346-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:47:19 2016
Return-Path: <gcc-bugs-return-544346-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 60744 invoked by alias); 21 Nov 2016 12:47: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 60194 invoked by uid 48); 21 Nov 2016 12:47:03 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78411] [7 Regression] FAIL: gcc.target/i386/pr45685.c scan-assembler-times cmov 6
Date: Mon, 21 Nov 2016 12:47: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: 7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78411-4-CSASivRjVL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78411-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78411-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: 2016-11/txt/msg02380.txt.bz2
Content-length: 300

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Oh, starting with r242550 this FAILs now everywhere.  The question is why it
FAILed for H.J. before r242550.
So shall we just add -ftree-loop-if-convert to dg-options of this test?
>From gcc-bugs-return-544345-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:45:38 2016
Return-Path: <gcc-bugs-return-544345-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 54839 invoked by alias); 21 Nov 2016 12:45:14 -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 54289 invoked by uid 48); 21 Nov 2016 12:44:53 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:47: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-n1V758PjBk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02379.txt.bz2
Content-length: 2363

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Eric Botcazou from comment #8)
> > where -1 no longer "fits" bool even though it should.  So
> > 
> >   /* Short-circuit boolean types since various transformations assume that
> >      they can only take values 0 and 1.  */
> >   if (TREE_CODE (type) == BOOLEAN_TYPE)
> >     return eq_p (x, 0) || eq_p (x, 1);
> > 
> > is wrong and should use eq_p (x, -1) instead as bool is signed?  The
> > int_fits_type_p function is likely wrong as well (uses integer_onep).
> 
> Standard boolean types as unsigned though, not signed:
> 
> Index: tree.c
> ===================================================================
> --- tree.c      (revision 242632)
> +++ tree.c      (working copy)
> @@ -8218,7 +8218,7 @@ build_nonstandard_boolean_type (unsigned
>  
>    type = make_node (BOOLEAN_TYPE);
>    TYPE_PRECISION (type) = precision;
> -  fixup_signed_type (type);
> +  fixup_unsigned_type (type);
>  
>    if (precision <= MAX_INT_CACHED_PREC)
>      nonstandard_boolean_type_cache[precision] = type;
> 
> fixes the ICE.

fortran does

static tree
gfc_build_logical_type (gfc_logical_info *info)
{
  int bit_size = info->bit_size;
  tree new_type;

  if (bit_size == BOOL_TYPE_SIZE)
    {
      info->c_bool = 1;
      return boolean_type_node;
    }

  new_type = make_unsigned_type (bit_size);
  TREE_SET_CODE (new_type, BOOLEAN_TYPE);
  TYPE_MAX_VALUE (new_type) = build_int_cst (new_type, 1);
  TYPE_PRECISION (new_type) = 1;

note that the vectorizer emits code to widen the boolean types expecting
sign-extension of vector truth (-1).  That matches what the RTL code gen
ends up doing semantics-wise.

It has been changed by

2015-11-09  Ilya Enkovich  <enkovich.gnu@gmail.com>

        * optabs.c (expand_vec_cond_expr): Always get sign from type.
        * tree.c (wide_int_to_tree): Support negative values for boolean.
        (build_nonstandard_boolean_type): Use signed type for booleans.

thus the signedness is wanted (so is the precision).  The issues arise
once we are extracting a vector element and performing the (_Bool) cast...
>From gcc-bugs-return-544347-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:47:46 2016
Return-Path: <gcc-bugs-return-544347-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 66140 invoked by alias); 21 Nov 2016 12:47: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 63288 invoked by uid 48); 21 Nov 2016 12:47:35 -0000
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:49: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ebotcazou at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-euKEAndfcS@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02381.txt.bz2
Content-length: 1160

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

--- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> It's built by build_nonstandard_boolean_type via
> 
> (gdb) bt
> #0  0x0000000001204281 in build_nonstandard_boolean_type (precision=32)
>     at /space/rguenther/src/gcc-git/gcc/tree.c:8219
> #1  0x000000000120e478 in build_truth_vector_type (nunits=4, vector_size=16)
>     at /space/rguenther/src/gcc-git/gcc/tree.c:10919
> #2  0x000000000118881a in get_mask_type_for_scalar_type (
>     scalar_type=<integer_type 0x2aaaac02a690 int>)
>     at /space/rguenther/src/gcc-git/gcc/tree-vect-stmts.c:8958
> #3  0x00000000019519b2 in search_type_for_mask_1 (
>     var=<ssa_name 0x2aaaac173438>, vinfo=0x28ab530, cache=...)
>     at /space/rguenther/src/gcc-git/gcc/tree-vect-patterns.c:3538
> #4  0x0000000001951be3 in search_type_for_mask (var=<ssa_name
> 0x2aaaac173438>, 
>     vinfo=0x28ab530)

Right, so it looks like Ada is not the only producer of non-standard boolean
types, there is even a helper function to do it.  Which means that any language
could be affected by the regression uncovered in Ada.
>From gcc-bugs-return-544348-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:49:51 2016
Return-Path: <gcc-bugs-return-544348-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 68341 invoked by alias); 21 Nov 2016 12:49:51 -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 68161 invoked by uid 48); 21 Nov 2016 12:49:38 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 12:53: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-DfknGSholU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02382.txt.bz2
Content-length: 235

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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following made them signed (but not precision 1).

https://gcc.gnu.org/ml/gcc-patches/2015-10/msg03030.html
>From gcc-bugs-return-544349-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 12:53:42 2016
Return-Path: <gcc-bugs-return-544349-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 105484 invoked by alias); 21 Nov 2016 12:53:41 -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 105380 invoked by uid 48); 21 Nov 2016 12:53:28 -0000
From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78396] [7 regression] gcc.dg/vect/bb-slp-cond-1.c FAILs after fix for PR77848
Date: Mon, 21 Nov 2016 13:05: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: 7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: wschmidt at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78396-4-2yzYk0DEqs@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78396-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78396-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: 2016-11/txt/msg02383.txt.bz2
Content-length: 283

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

--- Comment #3 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
The ??? comments worry me -- can't this leave us with the same kinds of
regressions that led to PR77848?  I think the specific test in that PR may
regress again.
>From gcc-bugs-return-544350-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:05:11 2016
Return-Path: <gcc-bugs-return-544350-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 56313 invoked by alias); 21 Nov 2016 13:05:11 -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 51083 invoked by uid 55); 21 Nov 2016 13:04:57 -0000
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78429] [6/7 Regression] ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)
Date: Mon, 21 Nov 2016 13:12: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: 7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenther at suse dot de
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78429-4-IuOeK1c9Lj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78429-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78429-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: 2016-11/txt/msg02384.txt.bz2
Content-length: 2187

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

--- Comment #12 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 21 Nov 2016, ebotcazou at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78429
> 
> --- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> > It's built by build_nonstandard_boolean_type via
> > 
> > (gdb) bt
> > #0  0x0000000001204281 in build_nonstandard_boolean_type (precision=32)
> >     at /space/rguenther/src/gcc-git/gcc/tree.c:8219
> > #1  0x000000000120e478 in build_truth_vector_type (nunits=4, vector_size=16)
> >     at /space/rguenther/src/gcc-git/gcc/tree.c:10919
> > #2  0x000000000118881a in get_mask_type_for_scalar_type (
> >     scalar_type=<integer_type 0x2aaaac02a690 int>)
> >     at /space/rguenther/src/gcc-git/gcc/tree-vect-stmts.c:8958
> > #3  0x00000000019519b2 in search_type_for_mask_1 (
> >     var=<ssa_name 0x2aaaac173438>, vinfo=0x28ab530, cache=...)
> >     at /space/rguenther/src/gcc-git/gcc/tree-vect-patterns.c:3538
> > #4  0x0000000001951be3 in search_type_for_mask (var=<ssa_name
> > 0x2aaaac173438>, 
> >     vinfo=0x28ab530)
> 
> Right, so it looks like Ada is not the only producer of non-standard boolean
> types, there is even a helper function to do it.  Which means that any language
> could be affected by the regression uncovered in Ada.

In practice the above is used in vector context only (plus in the
extraction the vectorizer builds).  I suppose that being more careful
at the extraction side may also help papering over this issue.

In the end having a bool_with_only_0_and_1 predicate rather than
open-coding (several variants of) the test throughout the middle-end
might be a good idea...

I don't remember off-head why we ended up with BOOLEA_TYPE element
vectors instead of using INTEGER_TYPE but I think it was because
the x86 backend actually ends up with QImode boolean vectors for
the sake of avx512 mask registers.  And I opposed to treating
'char' as vector which means we now have vector<bool> with QImode
or vector<"bool"> with V4SImode for non-AVX512 targets.

So we can identify VECTOR_BOOLEAN_TYPE_P.
>From gcc-bugs-return-544351-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:12:41 2016
Return-Path: <gcc-bugs-return-544351-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 97984 invoked by alias); 21 Nov 2016 13:12:41 -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 77536 invoked by uid 55); 21 Nov 2016 13:12:27 -0000
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78411] [7 Regression] FAIL: gcc.target/i386/pr45685.c scan-assembler-times cmov 6
Date: Mon, 21 Nov 2016 13:14: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: 7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenther at suse dot de
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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78411-4-PoFHTNJVfu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78411-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78411-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: 2016-11/txt/msg02385.txt.bz2
Content-length: 1792

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

--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 21 Nov 2016, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78411
> 
> --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Oh, starting with r242550 this FAILs now everywhere.  The question is why it
> FAILed for H.J. before r242550.
> So shall we just add -ftree-loop-if-convert to dg-options of this test?

Not sure.  Maybe remove it instead?  Why does RTL if-conversion not
catch it?  Or why does PHI-OPT not catch it:

  <bb 5>:
  # s_40 = PHI <s_2(4), 0(2)>
  # i_35 = PHI <i_3(4), 0(2)>
  _25 = MEM[base: products_16(D), index: i_35, step: 8, offset: 0B];
  if (_25 > 0)
    goto <bb 7>;
  else
    goto <bb 6>;

  <bb 6>:
  _17 = -_25;

  <bb 7>:
  # iftmp.0_13 = PHI <1(5), -1(6)>
  # prephitmp_10 = PHI <_25(5), _17(6)>
  # prephitmp_9 = PHI <-1(5), 1(6)>
  # prephitmp_33 = PHI <4294967295(5), 1(6)>
  # prephitmp_32 = PHI <1(5), 4294967295(6)>
  _31 = (long long unsigned int) prephitmp_10;

this should be ABS_EXPR<>.  I guess the other PHIs get in the way.
Earlier PHI-OPT has too convoluted tests still.  The above also
shows some excessive PRE of constants (we're inserting more PHIs
when dealing with a all-constant-arg PHI):

   <bb 5>:
-  # iftmp.0_12 = PHI <1(4), -1(12)>
-  _4 = _3 * iftmp.0_12;
-  _5 = (long long unsigned int) _4;
+  # iftmp.0_12 = PHI <1(3), -1(4)>
+  # prephitmp_37 = PHI <_3(3), _36(4)>
+  # prephitmp_38 = PHI <-1(3), 1(4)>
+  # prephitmp_39 = PHI <4294967295(3), 1(4)>
+  # prephitmp_41 = PHI <1(3), 4294967295(4)>
+  _5 = (long long unsigned int) prephitmp_37;

I guess I'll (finally) try to do something about that.
>From gcc-bugs-return-544352-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:14:59 2016
Return-Path: <gcc-bugs-return-544352-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 130522 invoked by alias); 21 Nov 2016 13:14: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 96123 invoked by uid 55); 21 Nov 2016 13:14:42 -0000
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/78396] [7 regression] gcc.dg/vect/bb-slp-cond-1.c FAILs after fix for PR77848
Date: Mon, 21 Nov 2016 13:22: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: 7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenther at suse dot de
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78396-4-WeZJVTKFga@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78396-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78396-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: 2016-11/txt/msg02386.txt.bz2
Content-length: 632

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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 21 Nov 2016, wschmidt at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78396
> 
> --- Comment #3 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
> The ??? comments worry me -- can't this leave us with the same kinds of
> regressions that led to PR77848?  I think the specific test in that PR may
> regress again.

Can you quickly check?  I thought nothing was vectorized there...

Note that this is likely the only improvement we can do in the GCC 7
timeframe.
>From gcc-bugs-return-544353-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:22:40 2016
Return-Path: <gcc-bugs-return-544353-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 47210 invoked by alias); 21 Nov 2016 13:22:40 -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 47013 invoked by uid 48); 21 Nov 2016 13:22:27 -0000
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/78432] [7 Regression] -fdump-go-spec ICEs for aligned causing x32 libgo library to fail to build
Date: Mon, 21 Nov 2016 13:30:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: go
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords: build, ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: doko at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ian at airs dot com
X-Bugzilla-Target-Milestone: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_gcctarget
Message-ID: <bug-78432-4-Q5cH1KmNSt@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78432-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78432-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: 2016-11/txt/msg02387.txt.bz2
Content-length: 524

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

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-linux-gnu,           |x86_64-linux-gnu,
                   |s390-linux-gnu              |s390-linux-gnu,
                   |                            |powerpc-linux-gnu

--- Comment #3 from Matthias Klose <doko at gcc dot gnu.org> ---
and powerpc-linux-gnu
>From gcc-bugs-return-544354-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:30:03 2016
Return-Path: <gcc-bugs-return-544354-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22495 invoked by alias); 21 Nov 2016 13:30:02 -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 22091 invoked by uid 48); 21 Nov 2016 13:29:46 -0000
From: "thopre01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/64802] [ARM] Selecting an -mcpu or -march that supports only one of ARM/Thumb should default to the ISA that *is* supported
Date: Mon, 21 Nov 2016 13:31: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: diagnostic
X-Bugzilla-Severity: minor
X-Bugzilla-Who: thopre01 at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: thopre01 at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc cf_known_to_work resolution assigned_to
Message-ID: <bug-64802-4-1riBMxthmR@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64802-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64802-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: 2016-11/txt/msg02388.txt.bz2
Content-length: 669

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

Thomas Preud'homme <thopre01 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |thopre01 at gcc dot gnu.org
      Known to work|                            |7.0
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |thopre01 at gcc dot gnu.org

--- Comment #2 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> ---
Fixed as of r242597.
>From gcc-bugs-return-544355-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:31:15 2016
Return-Path: <gcc-bugs-return-544355-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 39160 invoked by alias); 21 Nov 2016 13:31:14 -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 34173 invoked by uid 48); 21 Nov 2016 13:31:00 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/78342] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2657 (error: flow control insn inside a basic block)
Date: Mon, 21 Nov 2016 13:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 7.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-78342-4-h2oCmosdtU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78342-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78342-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: 2016-11/txt/msg02389.txt.bz2
Content-length: 1708

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-21
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'd say the bug is in combine, which turns:
(insn 58 78 109 6 (set (reg:SI 178 [ r2+-3 ])
        (const_int 1 [0x1])) "pr78342.c":23 373 {*movsi_internal1}
     (nil))
(insn 109 58 61 6 (trap_if (eq (reg:SI 178 [ r2+-3 ])
            (const_int 1 [0x1]))
        (const_int 0 [0])) -1
     (expr_list:REG_DEAD (reg:SI 178 [ r2+-3 ])
        (nil)))
;;  succ:       7 [100.0%]  (FALLTHRU)
into:
(note 58 78 109 6 NOTE_INSN_DELETED)
(insn 109 58 61 6 (trap_if (const_int 1 [0x1])
        (const_int 0 [0])) 602 {trap}
     (nil))
;;  succ:       7 [100.0%]  (FALLTHRU)

While trap_if (something other than const1_rtx) is considered normal insn,
trap_if (const1_rtx) is considered a noreturn insn like noreturn call, that has
to terminate a bb.  So I think what is wrong is that the corresponding bb still
has a successor, that edge should have been removed and cfg cleaned up. 
Possibly if the bb contains conditional trap_if in the middle of the bb and
combiner changes it, we should also split the bb.  Are there any other RTL
passes that turn conditional trap_if into unconditional?
>From gcc-bugs-return-544356-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:39:35 2016
Return-Path: <gcc-bugs-return-544356-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 84162 invoked by alias); 21 Nov 2016 13:39:34 -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 81770 invoked by uid 48); 21 Nov 2016 13:39:21 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/78411] [7 Regression] FAIL: gcc.target/i386/pr45685.c scan-assembler-times cmov 6
Date: Mon, 21 Nov 2016 13:41: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: 7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth 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: 7.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-78411-4-ydbtOhyuou@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-78411-4@http.gcc.gnu.org/bugzilla/>
References: <bug-78411-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: 2016-11/txt/msg02390.txt.bz2
Content-length: 2072

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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 4f17200..c50c598 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3017,6 +3017,7 @@ insert_into_preds_of_block (basic_block block, unsigned
int exprnum,
     }

   /* Make the necessary insertions.  */
+  bool all_constant = true;
   FOR_EACH_EDGE (pred, ei, block->preds)
     {
       gimple_seq stmts = NULL;
@@ -3041,8 +3042,15 @@ insert_into_preds_of_block (basic_block block, unsigned
int exprnum,
       if (is_gimple_min_invariant (builtexpr))
        avail[pred->dest_idx] = get_or_alloc_expr_for_constant (builtexpr);
       else
-       avail[pred->dest_idx] = get_or_alloc_expr_for_name (builtexpr);
+       {
+         avail[pred->dest_idx] = get_or_alloc_expr_for_name (builtexpr);
+         all_constant = false;
+       }
     }
+  /* If we're about to insert a PHI with all arguments constant refuse
+     to do that.  But return whether we inserted stuff.  */
+  if (all_constant)
+    return insertions;
   /* If we didn't want a phi node, and we made insertions, we still have
      inserted new stuff, and thus return true.  If we didn't want a phi node,
      and didn't make insertions, we haven't added anything new, so return


but that still leaves us with

  _25 = MEM[base: products_16(D), index: i_35, step: 8, offset: 0B];
  if (_25 > 0)
    goto <bb 7>;
  else
    goto <bb 6>;

  <bb 6>:
  _17 = -_25;

  <bb 7>:
  # iftmp.0_13 = PHI <1(5), -1(6)>
  # prephitmp_10 = PHI <_25(5), _17(6)>
  _9 = (long long unsigned int) prephitmp_10;

and thus phiopt not matching the ABS.  For some reason split-paths split
the loop latch confusing RTL if-conversion even more (removing the
possibility to emit a conditional store).

I don't believe what tree-if-conv.c did was reasonable here (together with PRE)
but we do not generate optimal code from the code in the testcase.

Still if-conversion is generally a RTL opt task.
>From gcc-bugs-return-544357-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:41:34 2016
Return-Path: <gcc-bugs-return-544357-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 351 invoked by alias); 21 Nov 2016 13:41:34 -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 129539 invoked by uid 48); 21 Nov 2016 13:41:27 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/78448] New: Container max_size() functions don't consider the range of their difference_type
Date: Mon, 21 Nov 2016 13:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-78448-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: 2016-11/txt/msg02391.txt.bz2
Content-length: 823

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

            Bug ID: 78448
           Summary: Container max_size() functions don't consider the
                    range of their difference_type
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include <vector>
#include <limits>
#include <cassert>

int main() {
 using V = std::vector<char>;
 V v;
 assert(v.max_size() <= std::numeric_limits<V::difference_type>::max());
}

The requirement is that max_size() returns:

   distance(begin(), end()) for the largest possible container

which must fit in Container::difference_type
>From gcc-bugs-return-544358-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 21 13:50:19 2016
Return-Path: <gcc-bugs-return-544358-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 33163 invoked by alias); 21 Nov 2016 13:50: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 33141 invoked by uid 89); 21 Nov 2016 13:50:18 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 testsºYES_20,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Young, onlinedocs, iterators.html, copy_n_vs_copy
X-HELO: mx1.redhat.com
Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Nov 2016 13:50:08 +0000
Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))	(No client certificate requested)	by mx1.redhat.com (Postfix) with ESMTPS id 1AB1F64C4;	Mon, 21 Nov 2016 13:50:07 +0000 (UTC)
Received: from localhost (ovpn-116-29.ams2.redhat.com [10.36.116.29])	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uALDo62J019937;	Mon, 21 Nov 2016 08:50:06 -0500
Date: Mon, 21 Nov 2016 14:10:00 -0000
From: Jonathan Wakely <jwakely@redhat.com>
To: Robert Young <yayooo@gmail.com>
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: copy_n should result in a one past the end input iterator
Message-ID: <20161121135005.GA3495@redhat.com>
References: <CAJjz_Nhe4ZFxREskMAyxNCTGse7x=0R7XoTx=+3z-7tV4KNzYw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <CAJjz_Nhe4ZFxREskMAyxNCTGse7x=0R7XoTx=+3z-7tV4KNzYw@mail.gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
User-Agent: Mutt/1.7.1 (2016-10-04)
X-SW-Source: 2016-11/txt/msg02392.txt.bz2
Content-length: 810

On 21/11/16 03:10 +0000, Robert Young wrote:
>/*
>gcc -Wall -Wextra -std=c++11 copy_n_vs_copy.cpp -lstdc++ -o copy_n_vs_copy
>
>One Past the End
>https://gcc.gnu.org/onlinedocs/libstdc++/manual/iterators.html#iterators.predefined.end
>
>BUG location:
>/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/stl_algo.h
>
>*/

Hi,

This mailing list is for automated email from our Bugzilla database,
if you send email to this list it is likely to be missed or ignored.

Please report bugs to Bugzilla as described at
https://gcc.gnu.org/bugs/

However, this is not a bug because it is unclear what the right
behaviour is for this algorithm, see
http://cplusplus.github.io/LWG/lwg-active.html#2471

We are not going to change libstdc++ until the C++ standards committee
decides what the right behaviour is.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-21  3:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-21  3:20 [Bug c++/78440] New: [7 Regression] [c++17] Incompatible exception-specification not diagnosed in explicit instantiation trippels 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).