This is the mail archive of the 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]

Re: [PATCH] convert braced initializers to strings (PR 71625)

On 08/15/2018 06:07 AM, Joseph Myers wrote:
On Tue, 14 Aug 2018, Martin Sebor wrote:

This is with Bison 3.0.4, should the version used to produce intl/plural.c
prove relevant.

Can you send me the translation unit and the options it was compiled
with that triggered the errors?

I've attached plural.i.  The error is a static link error linking sln, but
maybe comparing results of compiling plural.i before and after the changes
may be enlightening (unless it's actually a difference in code elsewhere
in glibc causing a link error reported in plural.o).

Compiled with:

-c -std=gnu11 -fgnu89-inline  -O2 -Wall -Werror -Wundef -Wwrite-strings
-fmerge-all-constants -fno-stack-protector -frounding-math -g
-Wstrict-prototypes -Wold-style-definition -fno-math-errno
-mlong-double-128 -mieee -mfp-rounding-mode=d     -ftls-model=initial-exec
-I../sysdeps/unix/sysv/linux/alpha/fpu  -I../sysdeps/alpha/fpu
-I../sysdeps/unix/sysv/linux/alpha  -I../sysdeps/alpha/nptl
-I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/ieee754/ldbl-64-128
-I../sysdeps/ieee754/ldbl-opt  -I../sysdeps/unix/sysv/linux/include
-I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread
-I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv
-I../sysdeps/unix/alpha  -I../sysdeps/unix  -I../sysdeps/posix
-I../sysdeps/alpha  -I../sysdeps/wordsize-64
-I../sysdeps/ieee754/ldbl-128  -I../sysdeps/ieee754/dbl-64/wordsize-64
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.
-DMODULE_NAME=libc -include ../include/libc-symbols.h
-DTOP_NAMESPACE=glibc -D'LOCALEDIR="/usr/share/locale"'
-D'LOCALE_ALIAS_PATH="/usr/share/locale"' -o

Thanks.  I don't see anything obviously wrong but I don't know
much about Alpha assembly.  Attached are the two .s files, with
(plural-new.s) and without (plural-old.s) the array-to-string

There are also only a handful of transformed arrays in the file
and they all look reasonable to me (see the attachment named
plural-array-to-string.txt).  The only arrays in the .sdata
section are yydefgoto and yypgoto, both before and after.
They are each just 3 bytes in size.

There is one unusual difference in the loads of one of them in
the assembly emitted by GCC for __gettextparse.


	ldah $22,yypgoto($29)				!gprelhigh
	lda $2,yypgoto($22)				!gprellow


	ldah $2,yypgoto+2305843009213693936($29)	!gprelhigh
	lda $2,yypgoto+2305843009213693936($2)		!gprellow

I don't know if it's significant -- the lda instruction uses
just the least significant 16 bits of the constant displacement,
shifted left by 16.  I don't see any obviously bogus constants
in the disassembly produced by objdump.

I'll need some help from someone who knows more about Alpha
to understand what's going on.


Attachment: plural-old.s
Description: Text document

Attachment: plural-new.s
Description: Text document

Attachment: plural-array-to-string.txt
Description: Text document

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