This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR40495


My last patch caused libgomp.c++/task-4.C to ICE (my bad - I forgot
-k on the make check command so checking finished early...).  The
following fixes it.

Bootstrapped on x86_64-unknown-linux-gnu, tests still running.

Richard.

2009-06-19  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40495
	* tree-ssa-structalias.c (process_constraint): Always use
	ptr_type_node for temporary decls.

Index: gcc/tree-ssa-structalias.c
===================================================================
*** gcc/tree-ssa-structalias.c	(revision 148718)
--- gcc/tree-ssa-structalias.c	(working copy)
*************** process_constraint (constraint_t t)
*** 2768,2777 ****
    if (rhs.type == DEREF && lhs.type == DEREF && rhs.var != anything_id)
      {
        /* Split into tmp = *rhs, *lhs = tmp */
!       tree rhsdecl = get_varinfo (rhs.var)->decl;
!       tree pointertype = TREE_TYPE (rhsdecl);
!       tree pointedtotype = TREE_TYPE (pointertype);
!       tree tmpvar = create_tmp_var_raw (pointedtotype, "doubledereftmp");
        struct constraint_expr tmplhs = get_constraint_exp_for_temp (tmpvar);
  
        process_constraint (new_constraint (tmplhs, rhs));
--- 2768,2774 ----
    if (rhs.type == DEREF && lhs.type == DEREF && rhs.var != anything_id)
      {
        /* Split into tmp = *rhs, *lhs = tmp */
!       tree tmpvar = create_tmp_var_raw (ptr_type_node, "doubledereftmp");
        struct constraint_expr tmplhs = get_constraint_exp_for_temp (tmpvar);
  
        process_constraint (new_constraint (tmplhs, rhs));
*************** process_constraint (constraint_t t)
*** 2780,2788 ****
    else if (rhs.type == ADDRESSOF && lhs.type == DEREF)
      {
        /* Split into tmp = &rhs, *lhs = tmp */
!       tree rhsdecl = get_varinfo (rhs.var)->decl;
!       tree pointertype = TREE_TYPE (rhsdecl);
!       tree tmpvar = create_tmp_var_raw (pointertype, "derefaddrtmp");
        struct constraint_expr tmplhs = get_constraint_exp_for_temp (tmpvar);
  
        process_constraint (new_constraint (tmplhs, rhs));
--- 2777,2783 ----
    else if (rhs.type == ADDRESSOF && lhs.type == DEREF)
      {
        /* Split into tmp = &rhs, *lhs = tmp */
!       tree tmpvar = create_tmp_var_raw (ptr_type_node, "derefaddrtmp");
        struct constraint_expr tmplhs = get_constraint_exp_for_temp (tmpvar);
  
        process_constraint (new_constraint (tmplhs, rhs));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]