This is the mail archive of the gcc-bugs@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]

[Bug c++/31714] [4.1 Regression] default_conversion ICE while processing_template_decl



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-13 14:35 -------
Confirmed.

The bogus part is actually that we have two TREE_LISTs as arguments to
BIT_IOR_EXPR:

<<< Unknown tree: cast_expr
  0 >>>
 | <<< Unknown tree: cast_expr
  0 >>>

Where the CAST_EXPRs with the tree-list are built from

#1  0x08195455 in build_c_cast (type=0xb7b64228, expr=0xb7b539d8)
    at /home/richard/src/gcc-4_1-branch/gcc/cp/typeck.c:5283
5283                              tree_cons (NULL_TREE, value, NULL_TREE));
(gdb) l
5278        return error_mark_node;
5279    
5280      if (processing_template_decl)
5281        {
5282          tree t = build_min (CAST_EXPR, type,
5283                              tree_cons (NULL_TREE, value, NULL_TREE));
5284          /* We don't know if it will or will not have side effects.  */
5285          TREE_SIDE_EFFECTS (t) = 1;
5286          return convert_from_reference (t);
5287        }

Note this happens while executing the convert_to_integer part of

     return fold_if_not_in_template (convert_to_integer (type, e));

but processing_template_decl is true.

This may be a generic (and now latent) problem that the quasi middle-end
convert_to_integer does call fold itself.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to work|                            |4.2.3 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-13 14:35:23
               date|                            |
            Summary|[4.1 regression]            |[4.1 Regression]
                   |default_conversion ICE while|default_conversion ICE while
                   |processing_template_decl    |processing_template_decl


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31714


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