]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Handle initializations of opaque types [PR106016]
authorPeter Bergner <bergner@linux.ibm.com>
Sat, 18 Jun 2022 04:43:23 +0000 (23:43 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Fri, 12 Aug 2022 00:25:52 +0000 (19:25 -0500)
commit6aaaf20ee4ad9c85f3099ef425720547644fb08d
tree5e360d871a7a1ce5241426576cbd94222adf1b9a
parent7c81a89f205b8ed3315b764740a811ef04d5dadc
c: Handle initializations of opaque types [PR106016]

The initial commit that added opaque types thought that there couldn't
be any valid initializations for variables of these types, but the test
case in the bug report shows that isn't true.  The solution is to handle
OPAQUE_TYPE initializations like the other scalar types.

2022-06-17  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR c/106016
* expr.cc (count_type_elements): Handle OPAQUE_TYPE.

gcc/testsuite/
PR c/106016
* gcc.target/powerpc/pr106016.c: New test.

(cherry picked from commit 975658b782f36dcf6eb190966d5b705977bfd5eb)
gcc/expr.cc
gcc/testsuite/gcc.target/powerpc/pr106016.c [new file with mode: 0644]