[Bug middle-end/71473] [5/6/7 Regression] cilkplus sum reducer ICE

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 19 17:14:00 GMT 2016


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
While this started with my commit, the actual bug is there from the start of
Cilk+ support.
The __sec_reduce_* builtins are declared with int return type, which doesn't
actual match what they return (it is in this case the type of the argument).
I bet the current way to deal with this is handle those in
resolve_overloaded_builtin and turn them into internal functions or something
similar and resolve the return type at that point.
The question is what to do with templates if the arguments are type dependent.
Another thing that is weird is that the __sec_reduce_{min,max}_ind return int,
I would have expected size_t or something more appropriate for array indexes. 
Does Cilk+ really mandate int in that case?  How can it be used on a very large
array then?


More information about the Gcc-bugs mailing list