Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686076 - sys-devel/gcc-9.1.0 - /usr/share/gcc-data/x86_64-pc-linux-gnu/9.1.0/locale/es/LC_MESSAGES/gcc.mo - ?
Summary: sys-devel/gcc-9.1.0 - /usr/share/gcc-data/x86_64-pc-linux-gnu/9.1.0/locale/es...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR90528
Whiteboard:
Keywords:
: 685418 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-16 06:54 UTC by Boris Carvajal
Modified: 2019-06-01 08:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
27_all_es-po.patch (27_all_es-po.patch,758 bytes, patch)
2019-05-18 08:38 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Carvajal 2019-05-16 06:54:09 UTC
There is a typo in the spanish translation of gcc messages that causes the compilation to stop with an assertion failure when emitting certain warning.
In this case the kernel prints this error (more if parallel compiling):

during GIMPLE pass: wrestrict
En la función ‘copy_bootdata’:
en pp_format, en pretty-print.c:1393
  377 | static void __init copy_bootdata(char *real_mode_data)
      |                    ^~~~~~~~~~~~~
Por favor, envíe un informe completo de errores,
con el código preprocesado si es apropiado.
Véase <https://bugs.gentoo.org/> para instrucciones.


Reduced test case:

1) Add a spanish locale. For example es_CL.UTF-8:

echo "es_CL.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen

2) Compile the following code with command:

LANG=es_CL.UTF-8 gcc -O2 -Warray-bounds test.c

// test.c
#include <string.h>
int main()
{
    struct S {
        char a[4];
    } s;
    memset(s.a, 'a', 5);
}


Workarounds:
 
1) Compile using other locale or LANG=C
2) Compile with -Warray-bounds=0 option
3) (Not recommended, only for testing)
    edit the binary file /usr/share/gcc-data/x86_64-pc-linux-gnu/9.1.0/locale/es/LC_MESSAGES/gcc.mo
    search for "%Qd" without quotes and change it to "%qD"


The problem lies in the gcc PO files from http://translationproject.org
I'll send an email to them.

The offending line in file gcc-9.1.0.es.po (since 8.1.0):

#: gimple-ssa-warn-restrict.c:1803
msgid "%G%qD offset %s from the object at %qE is out of the bounds of referenced subobject %qD with type %qT at offset %wu"
msgstr "El desplazamiento de %G%qD %s desde el objeto en %qE está fuera de los límites del subobjeto referenciado %Qd con tipo %qT en el desplazamiento %wu"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-05-16 07:00:00 UTC
Please provide more complete kernel build output. This usually includes both the command that was issued and all the command's output. Additionally, post your `emerge --info` output in a comment.
Comment 2 Boris Carvajal 2019-05-16 07:25:25 UTC
The kernel cmd can be just:
make defconfig
make
Posting more output it's just noise.
Comment 3 Boris Carvajal 2019-05-17 06:52:40 UTC
The translation has been fixed (at least for GCC9).
https://translationproject.org/PO-files/es/gcc-9.1.0.es.po
Comment 4 Mike Pagano gentoo-dev 2019-05-17 17:34:12 UTC
*** Bug 685418 has been marked as a duplicate of this bug. ***
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-18 08:05:27 UTC
It's not in gcc tree yet.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-18 08:38:38 UTC
Created attachment 577160 [details, diff]
27_all_es-po.patch

Filed bug upstream as https://gcc.gnu.org/PR90528

Attaching minimal patch to fix format string. Until it's pulled into gcc patchset you an drop it into /etc/portage/patches/sys-devel/gcc:9.1.0/ and rebuild gcc.
Comment 7 Larry the Git Cow gentoo-dev 2019-05-18 08:40:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=dc3396cc9b660164ce6d2949907f84a3d04d2a11

commit dc3396cc9b660164ce6d2949907f84a3d04d2a11
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-05-18 08:39:19 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-05-18 08:39:19 +0000

    9.1.0: fix format string for es locale, bug #686076
    
    Fix a typo in %Qd/%qD mismatch across en/es languages.
    
    Reported-and-fixed-by: Boris Carvajal
    Bug: https://bugs.gentoo.org/686076
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 9.1.0/gentoo/27_all_es-po.patch | 15 +++++++++++++++
 9.1.0/gentoo/README.history     |  1 +
 2 files changed, 16 insertions(+)
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-18 08:42:42 UTC
Will be in next 1.1 patchset in a few weeks.
Comment 9 Larry the Git Cow gentoo-dev 2019-06-01 08:01:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=877f78485c04a5c05cb30d38654ae030d61c2f47

commit 877f78485c04a5c05cb30d38654ae030d61c2f47
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-06-01 07:59:02 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 07:59:02 +0000

    9.1.0: cut 1.1 patchset
    
    Three new patches:
    26_all_ipa-incomplete.patch: fix ICE on pcsx2 package
    27_all_es-po.patch: fix ICE on es lcoales
    28_all_disable-riscv32-ABIs.patch: disable unconditional riscv32
    ABIs
    
    Bug: https://gcc.gnu.org/PR90303
    Bug: https://bugs.gentoo.org/686930
    Bug: https://gcc.gnu.org/PR90528
    Bug: https://bugs.gentoo.org/686076
    Bug: https://gcc.gnu.org/PR90419
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 9.1.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 10 Larry the Git Cow gentoo-dev 2019-06-01 08:13:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93052fb8b1eef5f3c61800eaa8d8acc858a349b0

commit 93052fb8b1eef5f3c61800eaa8d8acc858a349b0
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-06-01 08:03:25 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 08:03:25 +0000

    sys-devel/gcc: 9.1.0: cut 1.1 patchset
    
    Three new patches:
    26_all_ipa-incomplete.patch: fix ICE on pcsx2 package
    27_all_es-po.patch: fix ICE on es lcoales
    28_all_disable-riscv32-ABIs.patch: disable unconditional riscv32
    ABIs
    
    Bug: https://gcc.gnu.org/PR90303
    Closes: https://bugs.gentoo.org/686930
    Bug: https://gcc.gnu.org/PR90528
    Closes: https://bugs.gentoo.org/686076
    Bug: https://gcc.gnu.org/PR90419
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/Manifest            |  1 +
 sys-devel/gcc/gcc-9.1.0-r1.ebuild | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)