GCC build failed for native with your patch on 2003-09-05T11:02:39Z.

David Edelsohn dje@watson.ibm.com
Mon Sep 8 03:47:00 GMT 2003


>>>>> Jan writes:

> Can you please show me some testcase?  I will try to look into that
> ASAP.  The darwin related fixes didn't help?

	I think the only reason AIX 5 is working now is due to a quirk in
the linker, because the generated code is incomplete.  This appears to be
related to the COMDAT problems on AIX and I do not know how the
unit-at-a-time functionality interracts with the current COMDAT
work-around for systems without weak support.

	I am experimenting with all patches except:

        * cfgcleanup.c (try_simplify_condjump): Fix again the preivous patch.

I am bootstrapping with that patch overnight.  I don't think that patch is
suppose to affect this problem.

	The first appearance of the problem is in libstdc++ initialization
of ios_base::Init::_S_synced_with_stdio.  In ios_base.h, this is declared

    class Init
    {
      friend class ios_base;
    public:
      Init();
      ~Init();
      static bool
      _S_initialized() { return _S_ios_base_init; }
    private:
      static int _S_ios_base_init;
      static bool _S_synced_with_stdio;
    };

In ios.cc, it is defined:

  bool ios_base::Init::_S_synced_with_stdio = true;

and later used:

  ios_base::Init::Init()
  {
    if (_S_ios_base_init == 0)
      {
        ios_base::Init::_S_synced_with_stdio = true;
...

When ios.cc is compiled on AIX with -O2 and the current unit-at-a-time
functionality enabled, the variable is never allocated any space.  With
-fno-unit-at-a-time and everything else the same, the storage is
allocated.  I will send you a pre-processed file privately.  I have not
yet figured out all of the circumstances necessary to create a small
example. 

	A diff of the beginning of the assembly file default versus
-fno-unit-at-a-time shows the many symbols that reappear, beginning with
boolalpha:

--- ios.s	Sun Sep  7 22:51:17 2003
+++ ios.s.nounit	Sun Sep  7 22:49:19 2003
@@ -1,1323 +1,1428 @@
 	.file	"/gcc/dje/src/libstdc++-v3/src/ios.cc"
 	.toc
 	.csect .text[PR]
-	.globl _ZTISt8ios_base
-	.csect .data[RW],3
-	.align 2
-_ZTISt8ios_base:
-	.long	_ZTVN10__cxxabiv117__class_type_infoE+8
-	.long	_ZTSSt8ios_base
-	.csect _ios.rw_[RO],3
-	.align 2
-_ZTSSt8ios_base:
-	.byte "St8ios_base"
-	.byte 0
-	.globl _ZTINSt8ios_base7failureE
-	.csect .data[RW],3
-	.align 2
-_ZTINSt8ios_base7failureE:
-	.long	_ZTVN10__cxxabiv120__si_class_type_infoE+8
-	.long	_ZTSNSt8ios_base7failureE
-	.long	_ZTISt9exception
-	.csect _ios.rw_[RO],3
-	.align 2
-_ZTSNSt8ios_base7failureE:
-	.byte "NSt8ios_base7failureE"
-	.byte 0
-	.globl _ZTVNSt8ios_base7failureE
-	.csect .data[RW],3
-	.align 3
-_ZTVNSt8ios_base7failureE:
-	.long	0
-	.long	_ZTINSt8ios_base7failureE
-	.long	_ZNSt8ios_base7failureD1Ev[DS]
-	.long	_ZNSt8ios_base7failureD0Ev[DS]
-	.long	_ZNKSt8ios_base7failure4whatEv[DS]
-	.globl _ZTVSt8ios_base
-	.align 3
-_ZTVSt8ios_base:
-	.long	0
-	.long	_ZTISt8ios_base
-	.long	_ZNSt8ios_baseD1Ev[DS]
-	.long	_ZNSt8ios_baseD0Ev[DS]
-	.csect .text[PR]
 	.align 2
-	.globl _ZNKSt8ios_base7failure4whatEv
-	.globl ._ZNKSt8ios_base7failure4whatEv
-	.csect _ZNKSt8ios_base7failure4whatEv[DS]
-_ZNKSt8ios_base7failure4whatEv:
-	.long ._ZNKSt8ios_base7failure4whatEv, TOC[tc0], 0
+	.lglobl .wcsftime
+	.csect wcsftime[DS]
+wcsftime:
+	.long .wcsftime, TOC[tc0], 0
 	.csect .text[PR]
-._ZNKSt8ios_base7failure4whatEv:
-LFB..1522:
+.wcsftime:
+LFB..19:
 	.extern __mulh
 	.extern __mull
 	.extern __divss
 	.extern __divus
 	.extern __quoss
 	.extern __quous
-L..2:
-	addi 3,3,4
+	mflr 0
+	stw 0,8(1)
+LCFI..0:
+	stwu 1,-56(1)
+LCFI..1:
+	bl .__iso_wcsftime
+	nop
+	addi 1,1,56
+	lwz 0,8(1)
+	mtlr 0
 	blr
-LT.._ZNKSt8ios_base7failure4whatEv:
+LT..wcsftime:
 	.long 0
-	.byte 0,9,32,64,0,0,1,0
+	.byte 0,9,32,65,128,0,4,0
 	.long 0
-	.long LT.._ZNKSt8ios_base7failure4whatEv-._ZNKSt8ios_base7failure4whatEv
-	.short 34
-	.byte "_ZNKSt8ios_base7failure4whatEv[DS]"
+	.long LT..wcsftime-.wcsftime
+	.short 8
+	.byte "wcsftime"
 	.align 2
-LFE..1522:
-	.toc
-LC..0:
-	.tc _ZNSt8ios_base4Init20_S_synced_with_stdioE[TC],_ZNSt8ios_base4Init20_S_synced_with_stdioE
-LC..1:
-	.tc _ZN9__gnu_cxx13buf_cout_syncE[TC],_ZN9__gnu_cxx13buf_cout_syncE[RW]
-LC..2:
-	.tc _ZTVN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEEE.P8[TC],_ZTVN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEEE+8
-LC..3:
-	.tc _ZN9__gnu_cxx12buf_cin_syncE[TC],_ZN9__gnu_cxx12buf_cin_syncE[RW]
-LC..4:
-	.tc _ZN9__gnu_cxx13buf_cerr_syncE[TC],_ZN9__gnu_cxx13buf_cerr_syncE[RW]
-LC..5:
-	.tc _ZN9__gnu_cxx8buf_coutE[TC],_ZN9__gnu_cxx8buf_coutE[RW]
-LC..6:
-	.tc _iob.P32[TC],_iob[RW]+32
-LC..7:
-	.tc _ZN9__gnu_cxx7buf_cinE[TC],_ZN9__gnu_cxx7buf_cinE[RW]
-LC..8:
-	.tc _iob[TC],_iob[RW]
-LC..9:
-	.tc _ZN9__gnu_cxx8buf_cerrE[TC],_ZN9__gnu_cxx8buf_cerrE[RW]
-LC..10:
-	.tc _iob.P64[TC],_iob[RW]+64
-LC..11:
-	.tc _ZSt4cout.P4[TC],_ZSt4cout[RW]+4
-LC..12:
-	.tc _ZSt3cin.P8[TC],_ZSt3cin[RW]+8
-LC..13:
-	.tc _ZSt4cerr.P4[TC],_ZSt4cerr[RW]+4
-LC..14:
-	.tc _ZSt4clog.P4[TC],_ZSt4clog[RW]+4
-	.csect .text[PR]
+LFE..19:
 	.align 2
-	.globl _ZNSt8ios_base15sync_with_stdioEb
-	.globl ._ZNSt8ios_base15sync_with_stdioEb
-	.csect _ZNSt8ios_base15sync_with_stdioEb[DS]
-_ZNSt8ios_base15sync_with_stdioEb:
-	.long ._ZNSt8ios_base15sync_with_stdioEb, TOC[tc0], 0
+	.lglobl .wcstok
+	.csect wcstok[DS]
+wcstok:
+	.long .wcstok, TOC[tc0], 0
 	.csect .text[PR]
-._ZNSt8ios_base15sync_with_stdioEb:
-LFB..1553:
+.wcstok:
+LFB..20:
 	mflr 0
-	lwz 11,LC..0(2)
-	stw 31,-4(1)
-LCFI..0:
-	stw 29,-12(1)
-LCFI..1:
 	stw 0,8(1)
 LCFI..2:
-	mr. 0,3
-	stwu 1,-72(1)
+	stwu 1,-56(1)
 LCFI..3:
-	lbz 31,0(11)
-	bne- 0,L..5
-	cmpwi 7,31,0
-	bne- 7,L..80
-L..5:
-	addi 1,1,72
-	mr 3,31
+	bl .__iso_wcstok
+	nop
+	addi 1,1,56
 	lwz 0,8(1)
-	lwz 29,-12(1)
 	mtlr 0
-	lwz 31,-4(1)
 	blr
-L..80:
-L..7:
-L..13:
-L..19:
-L..25:
-	lwz 9,LC..1(2)
-	lwz 29,LC..2(2)
-	mr 3,9
-	stb 0,0(11)
-	stw 29,0(9)
-LEHB..0:
-	bl ._ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev
-	nop
-	lwz 9,LC..3(2)
-	mr 3,9
-	stw 29,0(9)
-	bl ._ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev
-	nop
-	lwz 9,LC..4(2)
-	mr 3,9
-	stw 29,0(9)
-	bl ._ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev
-	nop
-LEHE..0:
-	li 5,16
-	li 6,4096
-	lwz 4,LC..6(2)
-	lwz 3,LC..5(2)
-LEHB..1:
-	bl ._ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEEC1EP4FILESt13_Ios_Openmodem
-	nop
-LEHE..1:
-L..41:
-	lwz 4,LC..8(2)
-	li 5,8
-	li 6,4096
-	lwz 3,LC..7(2)
-LEHB..2:
-	bl ._ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEEC1EP4FILESt13_Ios_Openmodem
-	nop
-LEHE..2:
-L..57:
-	lwz 4,LC..10(2)
-	li 5,16
-	li 6,4096
-	lwz 3,LC..9(2)
-LEHB..3:
-	bl ._ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEEC1EP4FILESt13_Ios_Openmodem
-	nop
-LEHE..3:
-	lwz 4,LC..5(2)
-	lwz 3,LC..11(2)
-LEHB..4:
-	bl ._ZNSt9basic_iosIcSt11char_traitsIcEE5rdbufEPSt15basic_streambufIcS1_E
-	nop
-	lwz 4,LC..7(2)
-	lwz 3,LC..12(2)
-	bl ._ZNSt9basic_iosIcSt11char_traitsIcEE5rdbufEPSt15basic_streambufIcS1_E
-	nop
-	lwz 4,LC..9(2)
-	lwz 3,LC..13(2)
-	bl ._ZNSt9basic_iosIcSt11char_traitsIcEE5rdbufEPSt15basic_streambufIcS1_E
-	nop
-	lwz 4,LC..9(2)
-	lwz 3,LC..14(2)
-	bl ._ZNSt9basic_iosIcSt11char_traitsIcEE5rdbufEPSt15basic_streambufIcS1_E
-	nop
-	b L..5
-L..73:
-L..45:
-L..51:
-L..54:
-	bl ._Unwind_Resume
-	nop
-L..74:
-L..29:
-L..35:
-L..38:
-	bl ._Unwind_Resume
-	nop
-L..72:
-L..61:
-L..67:
-L..70:
-	bl ._Unwind_Resume
-	nop
-LEHE..4:
-LT.._ZNSt8ios_base15sync_with_stdioEb:
+LT..wcstok:
 	.long 0
-	.byte 0,9,32,65,128,3,1,0
+	.byte 0,9,32,65,128,0,3,0
 	.long 0
-	.long LT.._ZNSt8ios_base15sync_with_stdioEb-._ZNSt8ios_base15sync_with_stdioEb
-	.short 33
-	.byte "_ZNSt8ios_base15sync_with_stdioEb"
+	.long LT..wcstok-.wcstok
+	.short 6
+	.byte "wcstok"
+	.align 2
+LFE..20:
+	.globl _ZNSt11__ios_flags12_S_boolalphaE
+	.csect _ios.ro_[RO],3
+	.align 1
+_ZNSt11__ios_flags12_S_boolalphaE:
+	.short	1
+	.globl _ZNSt11__ios_flags6_S_decE
+	.align 1
+_ZNSt11__ios_flags6_S_decE:
+	.short	2
+	.globl _ZNSt11__ios_flags8_S_fixedE
+	.align 1
+_ZNSt11__ios_flags8_S_fixedE:
+	.short	4
+	.globl _ZNSt11__ios_flags6_S_hexE
+	.align 1
+_ZNSt11__ios_flags6_S_hexE:
+	.short	8
+	.globl _ZNSt11__ios_flags11_S_internalE
+	.align 1
+_ZNSt11__ios_flags11_S_internalE:
+	.short	16
+	.globl _ZNSt11__ios_flags7_S_leftE
+	.align 1
+_ZNSt11__ios_flags7_S_leftE:
+	.short	32
+	.globl _ZNSt11__ios_flags6_S_octE
+	.align 1
+_ZNSt11__ios_flags6_S_octE:
+	.short	64
+	.globl _ZNSt11__ios_flags8_S_rightE
+	.align 1
+_ZNSt11__ios_flags8_S_rightE:
+	.short	128
+	.globl _ZNSt11__ios_flags13_S_scientificE
+	.align 1
+_ZNSt11__ios_flags13_S_scientificE:
+	.short	256
+	.globl _ZNSt11__ios_flags11_S_showbaseE
+	.align 1
+_ZNSt11__ios_flags11_S_showbaseE:
+	.short	512
+	.globl _ZNSt11__ios_flags12_S_showpointE
+	.align 1
+_ZNSt11__ios_flags12_S_showpointE:
+	.short	1024
+	.globl _ZNSt11__ios_flags10_S_showposE
+	.align 1
+_ZNSt11__ios_flags10_S_showposE:
+	.short	2048
+	.globl _ZNSt11__ios_flags9_S_skipwsE
+	.align 1
+_ZNSt11__ios_flags9_S_skipwsE:
+	.short	4096
+	.globl _ZNSt11__ios_flags10_S_unitbufE
+	.align 1
+_ZNSt11__ios_flags10_S_unitbufE:
+	.short	8192
+	.globl _ZNSt11__ios_flags12_S_uppercaseE
+	.align 1
+_ZNSt11__ios_flags12_S_uppercaseE:
+	.short	16384
+	.globl _ZNSt11__ios_flags14_S_adjustfieldE
+	.align 1
+_ZNSt11__ios_flags14_S_adjustfieldE:
+	.short	176
+	.globl _ZNSt11__ios_flags12_S_basefieldE
+	.align 1
+_ZNSt11__ios_flags12_S_basefieldE:
+	.short	74
+	.globl _ZNSt11__ios_flags13_S_floatfieldE
+	.align 1
+_ZNSt11__ios_flags13_S_floatfieldE:
+	.short	260
+	.globl _ZNSt11__ios_flags9_S_badbitE
+	.align 1
+_ZNSt11__ios_flags9_S_badbitE:
+	.short	1
+	.globl _ZNSt11__ios_flags9_S_eofbitE
+	.align 1
+_ZNSt11__ios_flags9_S_eofbitE:
+	.short	2
+	.globl _ZNSt11__ios_flags10_S_failbitE
+	.align 1
+_ZNSt11__ios_flags10_S_failbitE:
+	.short	4
+	.globl _ZNSt11__ios_flags6_S_appE
+	.align 1
+_ZNSt11__ios_flags6_S_appE:
+	.short	1
+	.globl _ZNSt11__ios_flags6_S_ateE
+	.align 1
+_ZNSt11__ios_flags6_S_ateE:
+	.short	2
+	.globl _ZNSt11__ios_flags6_S_binE
+	.align 1
+_ZNSt11__ios_flags6_S_binE:
+	.short	4
+	.globl _ZNSt11__ios_flags5_S_inE
+	.align 1
+_ZNSt11__ios_flags5_S_inE:
+	.short	8
+	.globl _ZNSt11__ios_flags6_S_outE
+	.align 1
+_ZNSt11__ios_flags6_S_outE:
+	.short	16
+	.globl _ZNSt11__ios_flags8_S_truncE
+	.align 1
+_ZNSt11__ios_flags8_S_truncE:
+	.short	32
+	.globl _ZNSt8ios_base9boolalphaE
+	.align 2
+_ZNSt8ios_base9boolalphaE:
+	.long	1
+	.globl _ZNSt8ios_base3decE
+	.align 2
+_ZNSt8ios_base3decE:
+	.long	2
+	.globl _ZNSt8ios_base5fixedE
+	.align 2
+_ZNSt8ios_base5fixedE:
+	.long	4
+	.globl _ZNSt8ios_base3hexE
+	.align 2
+_ZNSt8ios_base3hexE:
+	.long	8
+	.globl _ZNSt8ios_base8internalE
+	.align 2
+_ZNSt8ios_base8internalE:
+	.long	16
+	.globl _ZNSt8ios_base4leftE
+	.align 2
+_ZNSt8ios_base4leftE:
+	.long	32
+	.globl _ZNSt8ios_base3octE
+	.align 2
+_ZNSt8ios_base3octE:
+	.long	64
+	.globl _ZNSt8ios_base5rightE
+	.align 2
+_ZNSt8ios_base5rightE:
+	.long	128
+	.globl _ZNSt8ios_base10scientificE
+	.align 2
+_ZNSt8ios_base10scientificE:
+	.long	256
+	.globl _ZNSt8ios_base8showbaseE
+	.align 2
+_ZNSt8ios_base8showbaseE:
+	.long	512
+	.globl _ZNSt8ios_base9showpointE
+	.align 2
+_ZNSt8ios_base9showpointE:
+	.long	1024
+	.globl _ZNSt8ios_base7showposE
+	.align 2
+_ZNSt8ios_base7showposE:
+	.long	2048
+	.globl _ZNSt8ios_base6skipwsE
+	.align 2
+_ZNSt8ios_base6skipwsE:
+	.long	4096
+	.globl _ZNSt8ios_base7unitbufE
+	.align 2
+_ZNSt8ios_base7unitbufE:
+	.long	8192
+	.globl _ZNSt8ios_base9uppercaseE
+	.align 2
+_ZNSt8ios_base9uppercaseE:
+	.long	16384
+	.globl _ZNSt8ios_base11adjustfieldE
+	.align 2
+_ZNSt8ios_base11adjustfieldE:
+	.long	176
+	.globl _ZNSt8ios_base9basefieldE
+	.align 2
+_ZNSt8ios_base9basefieldE:
+	.long	74
+	.globl _ZNSt8ios_base10floatfieldE
+	.align 2
+_ZNSt8ios_base10floatfieldE:
+	.long	260
+	.globl _ZNSt8ios_base6badbitE
+	.align 2
+_ZNSt8ios_base6badbitE:
+	.long	1
+	.globl _ZNSt8ios_base6eofbitE
+	.align 2
+_ZNSt8ios_base6eofbitE:
+	.long	2
+	.globl _ZNSt8ios_base7failbitE
+	.align 2
+_ZNSt8ios_base7failbitE:
+	.long	4
+	.globl _ZNSt8ios_base7goodbitE
 	.align 2
-LFE..1553:
+_ZNSt8ios_base7goodbitE:
+	.long	0
+	.globl _ZNSt8ios_base3appE
+	.align 2
+_ZNSt8ios_base3appE:
+	.long	1
+	.globl _ZNSt8ios_base3ateE
+	.align 2
+_ZNSt8ios_base3ateE:
+	.long	2
+	.globl _ZNSt8ios_base6binaryE
+	.align 2
+_ZNSt8ios_base6binaryE:
+	.long	4
+	.globl _ZNSt8ios_base2inE
+	.align 2
+_ZNSt8ios_base2inE:
+	.long	8
+	.globl _ZNSt8ios_base3outE
+	.align 2
+_ZNSt8ios_base3outE:
+	.long	16
+	.globl _ZNSt8ios_base5truncE
+	.align 2
+_ZNSt8ios_base5truncE:
+	.long	32
+	.globl _ZNSt8ios_base3begE
+	.align 2
+_ZNSt8ios_base3begE:
+	.long	0
+	.globl _ZNSt8ios_base3curE
+	.align 2
+_ZNSt8ios_base3curE:
+	.long	1
+	.globl _ZNSt8ios_base3endE
+	.align 2
+_ZNSt8ios_base3endE:
+	.long	2
+	.globl _ZNSt8ios_base18_S_local_word_sizeE
+	.align 2
+_ZNSt8ios_base18_S_local_word_sizeE:
+	.long	8
+	.globl _ZNSt8ios_base4Init16_S_ios_base_initE
 	.csect .data[RW],3
-LLSDA..1553:
-	.byte	0xff
-	.byte	0xff
-	.byte	0x3
-	.byte	0x41
-	.vbyte	4,LEHB..0-LFB..1553
-	.vbyte	4,LEHE..0-LEHB..0
-	.vbyte	4,0x0
-	.byte	0x0
-	.vbyte	4,LEHB..1-LFB..1553
-	.vbyte	4,LEHE..1-LEHB..1
-	.vbyte	4,L..74-LFB..1553
-	.byte	0x0
-	.vbyte	4,LEHB..2-LFB..1553
-	.vbyte	4,LEHE..2-LEHB..2
-	.vbyte	4,L..73-LFB..1553
-	.byte	0x0
-	.vbyte	4,LEHB..3-LFB..1553
-	.vbyte	4,LEHE..3-LEHB..3
-	.vbyte	4,L..72-LFB..1553
-	.byte	0x0
-	.vbyte	4,LEHB..4-LFB..1553
-	.vbyte	4,LEHE..4-LEHB..4
-	.vbyte	4,0x0
-	.byte	0x0
+	.align 2
+_ZNSt8ios_base4Init16_S_ios_base_initE:
+	.long	0
+	.globl _ZNSt8ios_base4Init20_S_synced_with_stdioE
+_ZNSt8ios_base4Init20_S_synced_with_stdioE:
+	.byte	1
+	.toc
+LC..1:
+	.tc _ZTVNSt8ios_base7failureE.P8[TC],_ZTVNSt8ios_base7failureE+8
+LC..2:
+	.tc _ZNSs4_Rep11_S_terminalE[TC],_ZNSs4_Rep11_S_terminalE[RW]



More information about the Gcc-regression mailing list