Fix __builtin_clear_padding for empty struct.
authorMartin Liska <mliska@suse.cz>
Wed, 2 Dec 2020 08:44:40 +0000 (09:44 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 2 Dec 2020 10:32:54 +0000 (11:32 +0100)
commit337d6362458ab033d3bfe287dda37f9da5577406
tree82450d60591c5f5ac3ba68b40deafdcb8471a5ee
parentee42f826b908e35ddbfcac4e06e00092f7cb3e9a
Fix __builtin_clear_padding for empty struct.

gcc/ChangeLog:

PR c/98087
* gimple-fold.c (clear_padding_type): Do not divide by zero.

gcc/testsuite/ChangeLog:

PR c/98087
* gcc.c-torture/compile/pr98087.c: New test.
gcc/gimple-fold.c
gcc/testsuite/gcc.c-torture/compile/pr98087.c [new file with mode: 0644]