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 pch/14137] [pch] ICE in cgraph_finalize_compilation_unit, at cgraphunit.c:407


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-23 21:52 -------
I'm not sure what to say about this patch.

You've fixed just one of a tiny number of problems of the same flavor.  (For
example, consider -fabi-version=X!)

Most (all other?) compilers with PCH implementations store the entire
command-line and compare it.  We should do the same, but that would take some
infrastructure.  

One good step would be to organize all of our flags into a single structure;
then that structure could be emitted as part of the PCH file.  For example:

  struct flags {
    int unit_at_a_time;
    ...
  };

(These could also be bitfields of course.)

Then, you wouldn't have to translate between flag_* and bits in the PCH header,
and you could just memcmp the two structures.

Yes, there might be cases where that would incorrect reject a PCH, but that is
the conservative choice.  You could make override the comparison of particular
fields to make the comparison laxer as required.

I'll approve this patch for GCC 3.4.0 and mainline, but I'd like to see a more
comprehensive approach attempted in future.

-- 


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


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