public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "spop at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/32367] [4.3 Regression] internal compiler error: in build_polynomial_chrec, at tree-chrec.h:113 Date: Sun, 17 Jun 2007 19:13:00 -0000 [thread overview] Message-ID: <20070617191346.16629.qmail@sourceware.org> (raw) In-Reply-To: <bug-32367-1649@http.gcc.gnu.org/bugzilla/> ------- Comment #11 from spop at gcc dot gnu dot org 2007-06-17 19:13 ------- Subject: Re: [4.3 Regression] internal compiler error: in build_polynomial_chrec, at tree-chrec.h:113 The ptrplus patch contains the following code: *************** interpret_rhs_modify_stmt (struct loop * *** 1611,1616 **** --- 1615,1630 ---- switch (TREE_CODE (opnd1)) { + case POINTER_PLUS_EXPR: + opnd10 = TREE_OPERAND (opnd1, 0); + opnd11 = TREE_OPERAND (opnd1, 1); + chrec10 = analyze_scalar_evolution (loop, opnd10); + chrec11 = analyze_scalar_evolution (loop, opnd11); + chrec10 = chrec_convert (type, chrec10, at_stmt); + chrec11 = chrec_convert (sizetype, chrec11, at_stmt); + res = chrec_fold_plus (type, chrec10, chrec11); + break; + case PLUS_EXPR: opnd10 = TREE_OPERAND (opnd1, 0); opnd11 = TREE_OPERAND (opnd1, 1); At this point we have the following values: (gdb) call debug_generic_expr (chrec10) {ptr_7, +, (unsigned int) (n_20 + 65535) * 4}_1 (gdb) call debug_generic_expr (chrec11) (unsigned int) {n_6 + 65535, +, 1}_1 * 4 (gdb) call debug_generic_expr (res) {ptr_7 + (unsigned int) {n_6 + 65535, +, 1}_1 * 4, +, (unsigned int) (n_20 + 65535) * 4}_1 chrec_fold_plus is completely disturbed by the "complicated" MULT_EXPR "{}_1 * 4", and just considers this expression to be constant, and finally it builds "ptr_7 + (unsigned int) {n_6 + 65535, +, 1}_1 * 4". The code in chrec_fold_multiply that is producing this MULT_EXPR is: return fold_build2 (MULT_EXPR, type, op0, op1); (gdb) p op0 $42 = (tree) 0xb7c27444 (gdb) pgs 4 (gdb) p op1 $43 = (tree) 0xb7ccf6a0 (gdb) pgs (unsigned int) (n_20 + 65535); (gdb) pt <nop_expr 0xb7ccf6a0 type <integer_type 0xb7c36000 unsigned int public unsigned sizetype SI size <integer_cst 0xb7c27658 constant invariant 32> unit size <integer_cst 0xb7c27444 constant invariant 4> align 32 symtab 0 alias set -1 canonical type 0xb7c3c0d8 precision 32 min <integer_cst 0xb7c27674 0> max <integer_cst 0xb7c27c08 -1>> arg 0 <plus_expr 0xb7c2d948 type <integer_type 0xb7c36288 short unsigned int sizes-gimplified public unsigned HI size <integer_cst 0xb7c275b0 constant invariant 16> unit size <integer_cst 0xb7c275cc constant invariant 2> align 16 symtab 0 alias set -1 canonical type 0xb7c36288 precision 16 min <integer_cst 0xb7c275e8 0> max <integer_cst 0xb7c27594 65535>> arg 0 <ssa_name 0xb7cdb5e4 type <integer_type 0xb7c36288 short unsigned int> var <var_decl 0xb7cd70b8 n> def_stmt <gimple_modify_stmt 0xb7cda770> version 20> arg 1 <integer_cst 0xb7c27594 constant invariant 65535>>> And here, unfortunately fold_build2 does not further simplify this expression because of the cast to uint around the PLUS_EXPR. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32367
next prev parent reply other threads:[~2007-06-17 19:13 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-06-16 16:57 [Bug c++/32367] New: " ubizjak at gmail dot com 2007-06-16 16:58 ` [Bug c++/32367] " ubizjak at gmail dot com 2007-06-16 17:21 ` [Bug tree-optimization/32367] [4.3 Regression] " pinskia at gcc dot gnu dot org 2007-06-16 20:03 ` pinskia at gcc dot gnu dot org 2007-06-16 20:32 ` pinskia at gcc dot gnu dot org 2007-06-16 20:41 ` pinskia at gcc dot gnu dot org 2007-06-16 20:56 ` pinskia at gcc dot gnu dot org 2007-06-16 21:16 ` pinskia at gcc dot gnu dot org 2007-06-16 21:41 ` pinskia at gcc dot gnu dot org 2007-06-17 13:38 ` spop at gcc dot gnu dot org 2007-06-17 17:32 ` pinskia at gcc dot gnu dot org 2007-06-17 19:13 ` spop at gcc dot gnu dot org [this message] 2007-06-17 19:17 ` spop at gcc dot gnu dot org 2007-06-19 18:36 ` spop at gcc dot gnu dot org 2007-06-25 1:54 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070617191346.16629.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).