From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29355 invoked by alias); 28 Oct 2012 03:22:49 -0000 Received: (qmail 29316 invoked by uid 48); 28 Oct 2012 03:22:32 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55093] [4.8 Regression] [x32] -maddress-mode=long failed Date: Sun, 28 Oct 2012 03:22: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 X-SW-Source: 2012-10/txt/msg02600.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55093 --- Comment #3 from H.J. Lu 2012-10-28 03:22:3= 1 UTC --- A small testcase: [hjl@gnu-tools-1 pr55093]$ cat x.ii=20 __extension__ typedef struct { } _G_fpos_t; typedef unsigned int hashval_t; typedef union tree_node *tree; typedef union gimple_statement_d *gimple; typedef const union tree_node *const_tree; typedef struct edge_def *edge; enum machine_mode { VOIDmode, }; struct double_int { unsigned long long low; long long high; }; struct real_value { }; struct real_format { bool has_signed_zero; }; extern const struct real_format * real_format_for_mode[1]; extern bool real_isnegzero (const struct real_value *); enum tree_code { REAL_CST, SSA_NAME }; struct tree_base { enum tree_code code : 16; union { unsigned int version; } u; }; extern void tree_check_failed (const_tree, const char *, int, const char *,= =20=20=20=20 ...) __attribute__ ((__noreturn__)); typedef struct ssa_use_operand_d { union { } loc; } ssa_use_operand_t; union tree_node { struct tree_base base; }; inline tree tree_check (tree __t, const char *__f, int __l, const char *__g, tree_code __c) { if (((enum tree_code) (__t)->base.code) !=3D __c) tree_check_failed= (__t, __f, __l, __g, __c, 0); union basic_block_il_dependent { } il; } typedef enum { } gimple_stmt_iterator; enum ssa_prop_result { SSA_PROP_NOT_INTERESTING, SSA_PROP_INTERESTING, SSA_PROP_VARYIN= G }; typedef enum ssa_prop_result (*ssa_prop_visit_stmt_fn) (gimple, edge *, tree *); typedef enum ssa_prop_result (*ssa_prop_visit_phi_fn) (gimple); typedef bool (*ssa_prop_fold_stmt_fn) (gimple_stmt_iterator *gsi); typedef tree (*ssa_prop_get_value_fn) (tree); void ssa_propagate (ssa_prop_visit_stmt_fn, ssa_prop_visit_phi_fn); bool substitute_and_fold (ssa_prop_get_value_fn, ssa_prop_fold_stmt_fn, boo= l); typedef enum { UNINITIALIZED, UNDEFINED, CONSTANT, VARYING } ccp_lattice_t; struct prop_value_d { ccp_lattice_t lattice_val; tree value; double_int mask; }; typedef struct prop_value_d prop_value_t; static prop_value_t *const_val; static void canonicalize_float_value (prop_value_t *); static bool ccp_fold_stmt (gimple_stmt_iterator *); static inline prop_value_t * get_value (tree var) { prop_value_t *val; canonicalize_float_value (val); } static inline tree get_constant_value (tree var) { prop_value_t *val; val =3D get_value (var); } static void canonicalize_float_value (prop_value_t *val) { enum machine_mode mode; struct real_value d; if (val->lattice_val !=3D CONSTANT || ((enum tree_code) (val->value)->base.code) !=3D REAL_CST) return; if (!(((real_format_for_mode[ mode ])->has_signed_zero)) && real_isnegzero (&d) ) { } } static bool set_lattice_value (tree var, prop_value_t new_val) { prop_value_t *old_val =3D &const_val[(tree_check ((var), "", 0, __FUNCTION__, (SSA_NAME)))->base.u.version]; canonicalize_float_value (&new_val); } static enum ssa_prop_result ccp_visit_phi_node (gimple phi) { prop_value_t new_val; if (set_lattice_value (0, new_val)) { } } static enum ssa_prop_result ccp_visit_stmt (gimple stmt, edge *taken_edge_p, tree *output_p) { tree def; prop_value_t v =3D { }; set_lattice_value (def, v); } unsigned int do_ssa_ccp (void) { ssa_propagate (ccp_visit_stmt, ccp_visit_phi_node); substitute_and_fold (get_constant_value, ccp_fold_stmt, true); } [hjl@gnu-tools-1 pr55093]$ make /usr/gcc-4.8.0-x32/bin/gcc -O2 -mx32 -maddress-mode=3Dlong -S x.ii x.ii: In function =E2=80=98bool set_lattice_value(tree, prop_value_t)=E2=80= =99: x.ii:87:1: internal compiler error: in print_reg, at config/i386/i386.c:140= 88 } ^ 0xcb3e48 print_reg(rtx_def*, int, _IO_FILE*) /export/gnu/import/git/gcc/gcc/config/i386/i386.c:14083 0xcb4185 ix86_print_operand_address /export/gnu/import/git/gcc/gcc/config/i386/i386.c:15046 0x8799ee output_address(rtx_def*) /export/gnu/import/git/gcc/gcc/final.c:3709 0xcba9cf ix86_print_operand(_IO_FILE*, rtx_def*, int) /export/gnu/import/git/gcc/gcc/config/i386/i386.c:14825 0x87994e output_operand(rtx_def*, int) /export/gnu/import/git/gcc/gcc/final.c:3693 0x87a284 output_asm_insn(char const*, rtx_def**) /export/gnu/import/git/gcc/gcc/final.c:3572 0x87b8fa final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*) /export/gnu/import/git/gcc/gcc/final.c:2890 0x87c085 final(rtx_def*, _IO_FILE*, int) /export/gnu/import/git/gcc/gcc/final.c:1919 0x87c469 rest_of_handle_final /export/gnu/import/git/gcc/gcc/final.c:4321 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. make: *** [x.s] Error 1 [hjl@gnu-tools-1 pr55093]$