From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40679 invoked by alias); 27 Jul 2015 23:03:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 40584 invoked by uid 48); 27 Jul 2015 23:02:58 -0000 From: "Casey at Carter dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67038] New: [c++-concepts] Viable function template despite unsatisfied constraints Date: Mon, 27 Jul 2015 23:03: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: c++-concepts X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Casey at Carter dot net 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: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg02406.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67038 Bug ID: 67038 Summary: [c++-concepts] Viable function template despite unsatisfied constraints Product: gcc Version: c++-concepts Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Casey at Carter dot net Target Milestone: --- Created attachment 36077 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D36077&action=3Dedit Preprocessed test case r226205 fails to compile this correct program: #include template I> requires !stl2::WeakInputIterator() constexpr bool dispatch() { return false; } template constexpr bool dispatch() { return true; } template I> constexpr bool is_weak_out() { return true; } template constexpr bool is_weak_in() { return true; } int main() { static_assert(is_weak_out()); static_assert(is_weak_in()); static_assert(dispatch()); } with error: ~/concept-gcc/bin/g++ -std=3Dgnu++1z -I ~/cmcstl2/include -I ~/cmcstl2/meta/include foo.cpp -c foo.cpp: In function =E2=80=98int main()=E2=80=99: foo.cpp:19:32: error: call of overloaded =E2=80=98dispatch()=E2=80=99 is am= biguous static_assert(dispatch()); ^ foo.cpp:5:16: note: candidate: constexpr bool dispatch() [with I =3D int*] constexpr bool dispatch() { return false; } ^ foo.cpp:8:16: note: candidate: constexpr bool dispatch() [with I =3D int*] constexpr bool dispatch() { return true; } ^ The compiler apparently considers both overloads of dispatch to be viable despite that the first overload's constraint !stl2::WeakInputIterator() = is clearly not satisfied when I is int*. >>From gcc-bugs-return-493517-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 27 23:45:21 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 57184 invoked by alias); 27 Jul 2015 23:45:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 56850 invoked by uid 55); 27 Jul 2015 23:45:15 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/66846] parloops does not always mark loops for fixup if needed Date: Mon, 27 Jul 2015 23:45: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.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: normal X-Bugzilla-Who: vries 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: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg02407.txt.bz2 Content-length: 1407 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66846 --- Comment #4 from vries at gcc dot gnu.org --- Author: vries Date: Mon Jul 27 23:44:43 2015 New Revision: 226279 URL: https://gcc.gnu.org/viewcvs?rev=226279&root=gcc&view=rev Log: Don't cancel loop tree in parloops 2015-07-28 Tom de Vries PR tree-optimization/66846 * omp-low.c (expand_omp_taskreg) [ENABLE_CHECKING]: Call verify_loop_structure for child_cfun if !LOOPS_NEED_FIXUP. (expand_omp_target) [ENABLE_CHECKING]: Same. (execute_expand_omp): Reinstate LOOPS_HAVE_SIMPLE_LATCHES if in ssa. [ENABLE_CHECKING]: Call verify_loop_structure for cfun if !LOOPS_NEED_FIXUP. (expand_omp_for_static_nochunk): Handle case that omp_for already has its own loop struct. * tree-parloops.c (create_parallel_loop): Add comment about breaking LOOPS_HAVE_SIMPLE_LATCHES. Record new exit. (gen_parallel_loop): Remove call to cancel_loop_tree. (parallelize_loops): Skip loops that are inner loops of parallelized loops. (pass_parallelize_loops::execute): Clear LOOPS_HAVE_SIMPLE_LATCHES on loop state. [ENABLE_CHECKING]: Call verify_loop_structure. Modified: branches/gomp-4_0-branch/gcc/ChangeLog.gomp branches/gomp-4_0-branch/gcc/omp-low.c branches/gomp-4_0-branch/gcc/tree-parloops.c