> I believe the rule is that you might only depend on the order of objects
> with respect to their DECL_UID, not the actual value of the DECL_UID.
> As var-tracking shouldn't look at TYPE_DECLs (?) it's probably a latent
> var-tracking bug as well.

It presumably doesn't look at TYPE_DECLs, simply the DECL_UID of variables is 
also different so this changes some hashing.

> I'd prefer the named parameter to be defaulted to false and the few
> places in the FEs fixed (eventually that name business should be
> handled like names for nodes like integer_type_node -- I see no
> reason why build_complex_type should have this special-case at all!
> That is, why are the named vairants in the type hash in the first place?)

I think that the calls in build_common_tree_nodes need to be changed too then:

  complex_integer_type_node = build_complex_type (integer_type_node);
  complex_float_type_node = build_complex_type (float_type_node);
  complex_double_type_node = build_complex_type (double_type_node);
  complex_long_double_type_node = build_complex_type (long_double_type_node);

in addition to:

./ada/gcc-interface/decl.c:         = build_complex_type
./ada/gcc-interface/decl.c:      return build_complex_type (nt);
./ada/gcc-interface/trans.c:      tree gnu_ctype = build_complex_type 
(gnu_type);
./c/c-decl.c:     specs->type = build_complex_type (specs->type);
./c/c-decl.c:     specs->type = build_complex_type (specs->type);
./c/c-decl.c:     specs->type = build_complex_type (specs->type);
./c/c-parser.c:                              build_complex_type
./c/c-typeck.c: return build_complex_type (subtype);
./c-family/c-common.c:  return build_complex_type (inner_type);
./c-family/c-lex.c:       type = build_complex_type (type);
./cp/decl.c:    type = build_complex_type (type);
./cp/typeck.c:  return build_type_attribute_variant (build_complex_type 
(subtype),
./fortran/trans-types.c:gfc_build_complex_type (tree scalar_type)
./fortran/trans-types.c:      type = gfc_build_complex_type (type);
./go/go-gcc.cc:                             
build_complex_type(TREE_TYPE(real_tree)),
./go/go-gcc.cc:      type = build_complex_type(type);
./lto/lto-lang.c:       return build_complex_type (inner_type);

Or perhaps *only* the calls in build_common_tree_nodes need to be changed?

It's certainly old code (r29604, September 1999).

-- 
Eric Botcazou

Reply via email to