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 bootstrap/66448] [6 Regression] Bootstrap fails on darwin after r224161


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66448

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 35710
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35710&action=edit
declare "extern int __CFConstantStringClassReference" lazily

There seem to be three issues triggered by 224161

1.  Debug is not initialised when the built-ins are initialised, therefore any
attempt to declare a variable at that time causes the segv. (hash table is not
present).

 * at present, *darwin* declares "extern int
__CFConstantStringClassReference[]" at the time that the CFString built-in is
initialised.

 - on the basis that it's not clear *if* such early declarations are allowed,
I've made a patch that makes the declaration lazily (when the fist use of the
built-in occurs).

 This works around the reported crash (one could also use DECL_SOURCE_LOCATION
!= BUILTINS_LOCATION as an additional test at passes.c:338, if built-ins *are*
supposed to be allowed to declare variables.

â however ...

====

2. Once (1) is fixed, bootstrap then fails with:

/GCC/gcc-trunk/gcc/ipa-pure-const.c:1640:1: error:
â{anonymous}::pass_ipa_pure_const::pass_ipa_pure_const(gcc::context*)â defined
but not used [-Werror=unused-function]
 pass_ipa_pure_const::

A --disable-werror boostrap completes, but there are a number of constructors
and destructors that report "declared but not used". AFAICT, it's only
constructors/destructors.

This is occurring at stage #2, and I thought maybe that the stage#1 compiler
could have been mis-compiled by the bootstrap; however, gcc-4.9, 5.1 and clang
(xcode 5.1.1) bootstraps all give the same result.

â additional info â

=====

3. During bootstrap (and in the test suite on the --disable-werror build) there
are a large number of warnings from ld64 (of course, this might be a limitation
of ld64, but for the record):

warning: invalid DWARF generated by the compiler: DIE 0x000002f7 has multiple 
AT_location attributes in
'/GCC/ml/gcc-trunk-xtools/x86_64-apple-darwin12/libgcc/enable-execute-stack_s.o'.
warning: invalid DWARF generated by the compiler: DIE 0x00000317 has multiple 
AT_location attributes in
'/GCC/ml/gcc-trunk-xtools/x86_64-apple-darwin12/libgcc/enable-execute-stack_s.o'.

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