This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 4.9.0 do not build on OSX
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Chris Johns <chrisj at rtems dot org>
- Cc: Andrew Pinski <pinskia at gmail dot com>, "Franzi Edo." <edo dot franzi at ukos dot ch>, GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 5 May 2014 16:12:43 +0200
- Subject: Re: gcc 4.9.0 do not build on OSX
- Authentication-results: sourceware.org; auth=none
- References: <F4A77010-AB07-4BEC-AFC9-7447CACDB03E at ukos dot ch> <53658E42 dot 8030204 at rtems dot org> <CA+=Sn1n3N_7w4zm7A1P_dmuh8uPG6xj16WQ0eVXs1HJ9Xr6ccQ at mail dot gmail dot com> <5367960A dot 8070702 at rtems dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, May 05, 2014 at 11:45:46PM +1000, Chris Johns wrote:
> On 4/05/2014 12:34 pm, Andrew Pinski wrote:
> >On Sat, May 3, 2014 at 5:48 PM, Chris Johns <chrisj@rtems.org> wrote:
> >>On 3/05/2014 10:57 pm, Franzi Edo. wrote:
> >>>
> >>>Hi,
> >>>I am trying to build a gcc-4.9.0 ARM cross compiler on OSX Mavericks
> >>>unsuccessfully.
> >>>My toolchain works fine with the previous version 4.8.2 but on the 4.9.0 I
> >>>have this error during the gcc building pass 1.
> >>>
> >>>/opt/uKOS/Packages/gcc-4.9.0/gcc/config/arm/neon.md:3486:10917: fatal
> >>>error:
> >>> bracket nesting level exceeded maximum of 256
> >>>/opt/uKOS/Packages/gcc-4.9.0/gcc/config/arm/neon.md:3486:10917: note: use
> >>> -fbracket-depth=N to increase maximum nesting level
> >>>32 warnings and 1 error generated.
> >>>make[1]: *** [insn-attrtab.o] Error 1
> >>>make: *** [all-gcc] Error 2
> >>>Error building gcc pass 1
> >
> >There is some large conditionals inside insn-attrtab.c but I don't see
> >any which have more than 30 depth of parenthesis. The max level of {}
> >is 4 in that file too.
>
> I have generated a preprocessed source file as asked by clang and it
> is attached to the PR I raised there. The file shows 288 brackets
> at line 51623 in the file.
>
> >So this sounds like a bug in clang. Please report it to them.
>
> The PR is http://llvm.org/bugs/show_bug.cgi?id=19650.
Looking at that line, guess it would be better if the generator (is that
genattrtab?) generated a switch rather than
if ((x == 1) || ((x == 2) || ((x == 3) || ((x == 4) || ((x == 5)...)))))
(at least I believe GCC doesn't yet transform a series of if conditions into
a switch (it optimizes the other direction)).
And, even if it doesn't generate a switch for say some attribute compared to
more than 10 values, there is no point in adding the extra ()s when
the operator || and operator || used in the rhs of it are the same.
Jakub