public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
@ 2021-11-23  7:41 marxin at gcc dot gnu.org
  2021-11-23  7:52 ` [Bug middle-end/103374] " ebotcazou at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-23  7:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103374

            Bug ID: 103374
           Summary: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented:
                    __builtin_clear_padding not supported for variable
                    length aggregates
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: qing.zhao at oracle dot com
  Target Milestone: ---

I tried bootstrapping GCC with -ftrivial-auto-var-init=pattern but it fails
here:

[  978s]
/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git189862/obj-i586-suse-linux/./prev-gcc/xgcc
-B/home/abuild/rpmbuild/BUILD/gcc-12.0.0+git189862/obj-i586-suse-linux/./prev-gcc/
-B/usr/i586-suse-linux/bin/ -B/usr/i586-suse-linux/bin/
-B/usr/i586-suse-linux/lib/ -isystem /usr/i586-suse-linux/include -isystem
/usr/i586-suse-linux/sys-include   -fno-checking -c -fomit-frame-pointer -O3
-D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -Werror=return-type -Wno-error
-ftrivial-auto-var-init=pattern -g -U_FORTIFY_SOURCE -fno-checking -gtoggle
-fprofile-generate  -gnatpg  -W -Wall -nostdinc -I- -I. -Iada/generated -Iada
-I../../gcc/ada -Iada/libgnat -I../../gcc/ada/libgnat -Iada/gcc-interface
-I../../gcc/ada/gcc-interface ../../gcc/ada/exp_ch4.adb -o ada/exp_ch4.o
[  979s] ../../gcc/ada/exp_ch4.adb: In function
'Exp_Ch4.Expand_N_Indexed_Component':
[  979s] ../../gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented:
__builtin_clear_padding not supported for variable length aggregates
[  979s] make[3]: *** [../../gcc/ada/gcc-interface/Make-lang.in:167:
ada/exp_ch4.o] Error 1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/103374] sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
  2021-11-23  7:41 [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates marxin at gcc dot gnu.org
@ 2021-11-23  7:52 ` ebotcazou at gcc dot gnu.org
  2021-11-23  8:05 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-11-23  7:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103374

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|ada                         |middle-end
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |ebotcazou at gcc dot gnu.org
            Summary|gcc/ada/exp_ch4.adb:7165:10 |sorry, unimplemented:
                   |: sorry, unimplemented:     |__builtin_clear_padding not
                   |__builtin_clear_padding not |supported for variable
                   |supported for variable      |length aggregates
                   |length aggregates           |
   Last reconfirmed|                            |2021-11-23

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Recategorizing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/103374] sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
  2021-11-23  7:41 [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates marxin at gcc dot gnu.org
  2021-11-23  7:52 ` [Bug middle-end/103374] " ebotcazou at gcc dot gnu.org
@ 2021-11-23  8:05 ` pinskia at gcc dot gnu.org
  2021-11-23  8:12 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-23  8:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103374

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced C testcase:
int f(int t)
{
  struct s{int y[t];};
  struct s u;
  return u.y[0];
}

Compile with -ftrivial-auto-var-init=pattern .

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/103374] sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
  2021-11-23  7:41 [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates marxin at gcc dot gnu.org
  2021-11-23  7:52 ` [Bug middle-end/103374] " ebotcazou at gcc dot gnu.org
  2021-11-23  8:05 ` pinskia at gcc dot gnu.org
@ 2021-11-23  8:12 ` marxin at gcc dot gnu.org
  2021-11-23  8:16 ` pinskia at gcc dot gnu.org
  2021-11-23 13:27 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-23  8:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103374

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you Andrew for the C test-case.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/103374] sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
  2021-11-23  7:41 [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-23  8:12 ` marxin at gcc dot gnu.org
@ 2021-11-23  8:16 ` pinskia at gcc dot gnu.org
  2021-11-23 13:27 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-23  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103374

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> Thank you Andrew for the C test-case.

It was easy to generate knowing what Ada code has and understanding the sorry
message and knowing the reason why GNU C exposes these kind of structures to
basically test what Ada front-end produces also.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/103374] sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates
  2021-11-23  7:41 [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-23  8:16 ` pinskia at gcc dot gnu.org
@ 2021-11-23 13:27 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-23 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103374

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
__builtin_clear_padding is intended primarily for C++ which doesn't have these,
I have no plans to support variable length structures in there.  So, probably
gimplify_decl_expr should next to clear_padding_type_may_have_padding_p
also check that int_size_in_bytes (strip_array_types (TREE_TYPE (decl))) > 0
(while zero sized types can be handled, there is certainly no padding in them,
so > 0 rather than >= 0).

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-23 13:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23  7:41 [Bug ada/103374] New: gcc/ada/exp_ch4.adb:7165:10: sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates marxin at gcc dot gnu.org
2021-11-23  7:52 ` [Bug middle-end/103374] " ebotcazou at gcc dot gnu.org
2021-11-23  8:05 ` pinskia at gcc dot gnu.org
2021-11-23  8:12 ` marxin at gcc dot gnu.org
2021-11-23  8:16 ` pinskia at gcc dot gnu.org
2021-11-23 13:27 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).