From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29952 invoked by alias); 26 Sep 2014 15:02:43 -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 29903 invoked by uid 48); 26 Sep 2014 15:02:38 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59759] internal compiler error: in unify, using std::enable_if on classes Date: Fri, 26 Sep 2014 15:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc target_milestone everconfirmed cf_known_to_fail Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-09/txt/msg02478.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59759 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-09-26 CC| |trippels at gcc dot gnu.org Target Milestone|--- |4.8.4 Ever confirmed|0 |1 Known to fail| |4.8.3, 4.9.1, 5.0 --- Comment #7 from Markus Trippelsdorf --- markus@x4 tmp % cat test3.ii namespace std { template struct B { static constexpr _Tp value =3D 0; }; typedef B false_type; struct C : false_type {}; template struct is_integral : C {}; template struct enable_if { typedef _Tp type; }; } enum class enabled; constexpr enabled dummy{}; template ::value, enabled>::type =3D dummy> class A; template void f(A*) { A* map; f(map); } markus@x4 tmp % g++ -c -std=3Dc++11 test3.ii test3.ii: In substitution of =E2=80=98template void f(A*) [with= T =3D ]=E2=80=99: test3.ii:23:8: required from here test3.ii:23:8: internal compiler error: in unify, at cp/pt.c:18392 f(map); ^ 0x606105 unify ../../gcc/gcc/cp/pt.c:18392 0x6067a4 unify ../../gcc/gcc/cp/pt.c:18234 0x51d9b8 try_class_unification ../../gcc/gcc/cp/pt.c:17248 0x605b77 unify ../../gcc/gcc/cp/pt.c:18271 0x605d5c unify ../../gcc/gcc/cp/pt.c:18138 0x6093f4 unify_one_argument ../../gcc/gcc/cp/pt.c:16657 0x60baea type_unification_real ../../gcc/gcc/cp/pt.c:16728 0x614aac fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:16164 0x5843e9 add_template_candidate_real ../../gcc/gcc/cp/call.c:3025 0x584e5c add_template_candidate ../../gcc/gcc/cp/call.c:3122 0x584e5c add_candidates ../../gcc/gcc/cp/call.c:5253 0x587413 perform_overload_resolution ../../gcc/gcc/cp/call.c:3971 0x5897da build_new_function_call(tree_node*, vec**, bool, int) ../../gcc/gcc/cp/call.c:4048 0x7032ac finish_call_expr(tree_node*, vec**, b= ool, bool, int) ../../gcc/gcc/cp/semantics.c:2366 0x688c55 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6232 0x68bb09 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7293 0x68c744 cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8035 0x68ccd9 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8278 0x68f4c4 cp_parser_expression ../../gcc/gcc/cp/parser.c:8440 0x68fcfc cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:9828 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. >>From gcc-bugs-return-462645-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 26 15:27:02 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 15861 invoked by alias); 26 Sep 2014 15:27:01 -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 15763 invoked by uid 48); 26 Sep 2014 15:26:54 -0000 From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63375] [4.8/4.9/5 Regression] reordering of reads across fences Date: Fri, 26 Sep 2014 15: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: 4.9.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.4 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: 2014-09/txt/msg02479.txt.bz2 Content-length: 959 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63375 --- Comment #4 from Martin Jambor --- SRA is indeed quite guilty, the following patch fixes it: diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 8259dba..fb24114 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1064,6 +1064,11 @@ build_access_from_expr_1 (tree expr, gimple stmt, bool write) "component."); return NULL; } + if (TREE_THIS_VOLATILE (expr)) + { + disqualify_base_of_expr (expr, "part of a volatile reference."); + return NULL; + } switch (TREE_CODE (expr)) { Nevertheless, it is apparently not the only culprit. Even on trunk with -fno-tree-sra we produce exactly the same assembly output. From a brief look at the dumps it seems that RTL fwprop1 is the pass moving the load, however I have not had a look if it is its fault or if expansion looses the volatility information somehow.