Bug 45444 - [4.6 regression] ARM bootstrap failure: uninitialized const member in 'neon_builtin_datum' is invalid in C++ [-Werror=c++-compat]
Summary: [4.6 regression] ARM bootstrap failure: uninitialized const member in 'neon_b...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.6.0
: P1 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 44670 45514 (view as bug list)
Depends on:
Blocks: enable-werror-always 44433
  Show dependency treegraph
 
Reported: 2010-08-29 15:23 UTC by Mikael Pettersson
Modified: 2010-11-15 13:45 UTC (History)
5 users (show)

See Also:
Host: armv5tel-unknown-linux-gnueabi, i686-pc-linux-gnu
Target: *-arm-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-10-06 08:15:34


Attachments
preliminary fixes for arm.c stage2 errors (836 bytes, patch)
2010-08-29 16:26 UTC, Mikael Pettersson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Pettersson 2010-08-29 15:23:38 UTC
Attempting to bootstrap gcc-4.6-20100828 on armv5tel-linux-gnueabi fails in stage 2 with:

/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c: In function 'arm_get_pcs_model':
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:3725:7: error: passing argument 1 of 'stdarg_p' discards 'const' qualifier from pointer target type [-Werror]
/home/mikpe/gcc-4.6-20100828/gcc/tree.h:4851:13: note: expected 'tree' but argument is of type 'const_tree'
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c: In function 'locate_neon_builtin_icode':
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:18913:22: error: uninitialized const member in 'neon_builtin_datum' is invalid in C++ [-Werror=c++-compat]
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:17969:20: note: 'itype' should be initialized
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:18913:22: error:  in 'neon_builtin_datum' is invalid in C++ [-Werror=c++-compat]
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:17970:13: note: 'bits' should be initialized
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:18913:22: error: uninitialized const member in 'neon_builtin_datum' is invalid in C++ [-Werror=c++-compat]
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:17971:24: note: 'codes' should be initialized
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:18913:22: error: uninitialized const member in 'neon_builtin_datum' is invalid in C++ [-Werror=c++-compat]
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:17972:22: note: 'num_vars' should be initialized
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c: In function 'arm_output_asm_insn':
/home/mikpe/gcc-4.6-20100828/gcc/config/arm/arm.c:22649:3: error: function might be possible candidate for 'gnu_printf' format attribute [-Werror=missing-format-attribute]
cc1: all warnings being treated as errors

make[3]: *** [arm.o] Error 1
make[3]: Leaving directory `/home/mikpe/objdir46/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/mikpe/objdir46'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/mikpe/objdir46'
make: *** [bootstrap] Error 2

The first error in arm_ge_pcs_model () was reported 11 days ago as PR45321.  The other 'uninitialized const member' warnings/errors are new since then.  I can't see any obvious recent changes in arm.c that would explain them, so I suspect they're caused by some C front-end change.
Comment 1 Mikael Pettersson 2010-08-29 16:26:15 UTC
Created attachment 21586 [details]
preliminary fixes for arm.c stage2 errors

This gets me past the arm.c stage2 errors.
Comment 2 Ramana Radhakrishnan 2010-08-31 08:15:34 UTC
confirmed. I was working on fixing this but you beat my patch to it. 
cheers
Ramana
Comment 3 Ramana Radhakrishnan 2010-09-01 08:49:15 UTC
*** Bug 44670 has been marked as a duplicate of this bug. ***
Comment 4 Jorn Wolfgang Rennecke 2010-09-01 09:38:28 UTC
The 'uninitialized const members' warning also affects cross builds when
using --enable-build-with-cxx, see PR44670
Comment 5 Mikael Pettersson 2010-09-02 12:00:04 UTC
Patch has been posted:
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00048.html
Comment 6 Ramana Radhakrishnan 2010-09-03 07:19:06 UTC
*** Bug 45514 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Jelinek 2010-11-11 09:35:34 UTC
Any progress here?
Comment 8 Mikael Pettersson 2010-11-11 10:04:21 UTC
(In reply to comment #7)
> Any progress here?

The patch was posted and OK:d, but stalled apparently because I don't yet have a copyright assignment on file.  My new employer's (Rogue Wave) legal department is supposed to come up with an employer's disclaimer for my GCC contributions, but they're taking forever to do so.
Comment 9 Jorn Wolfgang Rennecke 2010-11-15 13:40:40 UTC
Author: amylaar
Date: Mon Nov 15 13:40:27 2010
New Revision: 166753

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166753
Log:
	PR bootstrap/45444
	* config/arm/arm.c (locate_neon_builtin_icode): Initialize key.
	(arm_output_asm_insn) Add ATTRIBUTE_PRINTF_4.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.c
Comment 10 Jorn Wolfgang Rennecke 2010-11-15 13:45:34 UTC
I've checked my patch into trunk.