"test-fcntl-h.c", line 76.10: 1506-052 (S) Duplicate case label for value 0. Labels must be unique.
"test-fcntl-h.c", line 118.10: 1506-052 (S) Duplicate case label for value 0. Labels must be unique.
The error shows up with the optimizer is set to level 5 -O5. The difference between this level and level 4 -O4 is
with level 5 the option qipa is change from the default of object (-qipa=object) to level=2 (-qipa=level=2).
-O5 is the same as ... -O4 -qipa=level=2 ...
As another side note, I've build about 6-7 other GNU packages with -O5 and no issues, or at least no issues with O5.
Update ...
CCLD sdiff
(ld): setopt 64
(ld): halt 4
(ld): setopt rtl
(ld): setopt rtllib
(ld): setopt symbolic:1
(ld): setfflag 4
(ld): savename sdiff
(ld): filelist 10 1
(ld): i /tmp/.o_ipagmyMae
(ld): i /tmp/.o_ipawyyMaj
(ld): setopt noautoimp
(ld): i /lib/crt0_64.o
(ld): setopt autoimp
(ld): i /usr/local/lib/libiconv.a
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/vac/lib/libxlipa.a
(ld): lib /usr/vac/lib/libxl.a
(ld): lib /usr/lib/libpthreads.a
(ld): lib /usr/lib/libc.a
(ld): lib /usr/lib/librtl.a
LIBRARY: Shared object /usr/local/lib/libiconv.a[shr4_64.o]: 10 symbols imported.
LIBRARY: Shared object libpthreads.a[shr_xpg5_64.o]: 346 symbols imported.
LIBRARY: Shared object libc.a[shr_64.o]: 3095 symbols imported.
LIBRARY: Shared object libc.a[posix_aio_64.o]: 20 symbols imported.
LIBRARY: Shared object libc.a[aio_64.o]: 18 symbols imported.
LIBRARY: Shared object libc.a[pse_64.o]: 8 symbols imported.
LIBRARY: Shared object libc.a[dl_64.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty_64.o]: 1 symbols imported.
LIBRARY: Shared object libc.a[cthread_64.o]: 25 symbols imported.
LIBRARY: Shared object libc.a[uchar_64.o]: 4 symbols imported.
LIBRARY: Shared object librtl.a[lazy42_64.o]: 3 symbols imported.
FILELIST: Number of previously inserted files processed: 10
(ld): resolve
RESOLVE: 221 of 7636 symbols were kept.
(ld): addgl /usr/lib/glink64.o
ADDGL: Glink code added for 7 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
address@hidden@null_action [200] ER DS sdiff.c(/tmp/.o_ipawyyMaj)
00004d60 .data R_POS [202] <@address@hidden>
ER: The return code is 8.
1586-347 (U) An error occurred during linking of the object produced by the IPA Link step. The link return code was 8.