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++/12320] [3.4 Regression] ICE on use of undefined enum


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dannysmith at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com


------- Additional Comments From dannysmith at gcc dot gnu dot org  2003-09-18 01:19 -------
This fixes the bug.  Regtesting in progress. 

	* call.c (type_passed_as): Check for incomplete type.
	(convert_for_arg_passing): Likewise.

*** call.c	17 Sep 2003 23:42:53 -0000	1.434
--- call.c	18 Sep 2003 01:11:19 -0000
*************** type_passed_as (tree type)
*** 4342,4347 ****
--- 4342,4348 ----
      type = build_reference_type (type);
    else if (PROMOTE_PROTOTYPES
  	   && INTEGRAL_TYPE_P (type)
+ 	   && COMPLETE_TYPE_P (type)
  	   && INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
  				   TYPE_SIZE (integer_type_node)))
      type = integer_type_node;
*************** convert_for_arg_passing (tree type, tree
*** 4361,4366 ****
--- 4362,4368 ----
      val = build1 (ADDR_EXPR, build_reference_type (type), val);
    else if (PROMOTE_PROTOTYPES
  	   && INTEGRAL_TYPE_P (type)
+ 	   && COMPLETE_TYPE_P (type)
  	   && INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
  				   TYPE_SIZE (integer_type_node)))
      val = perform_integral_promotions (val);


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