]> 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>
Tue, 26 Jul 2022 15:04:44 +0000 (10:04 -0500)
commit975658b782f36dcf6eb190966d5b705977bfd5eb
tree34cf4546577b46404d91bf0f6c5a969369ee148e
parent5b96c823e591980a80481eb3fe72092a6146f742
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.
gcc/expr.cc
gcc/testsuite/gcc.target/powerpc/pr106016.c [new file with mode: 0644]