C++ PATCH for c++/53650 (memory-hog with large array)
Jakub Jelinek
jakub@redhat.com
Thu Jan 3 16:54:00 GMT 2013
On Thu, Jan 03, 2013 at 11:48:48AM -0500, Jason Merrill wrote:
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/init/array34.C
> @@ -0,0 +1,13 @@
> +// PR c++/53650
> +// We should loop over array inits if they don't involve temporaries
> +// that need extending.
> +// { dg-final { scan-assembler-times "_ZN5ClassC1Ev" 1 } }
> +
> +struct Class {
> + Class();
> +};
> +
> +int main() {
> + Class table [10] = {};
> + return 0;
> +}
Won't the test fail on weirdo targets that need some extern directives
for the external symbols?
I'd say safer would be to scan the gimple dump instead...
Jakub
More information about the Gcc-patches
mailing list