This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/33720] A negative value in OpenMP clause num_threads is not detected at runtime
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Nov 2007 19:37:44 -0000
- Subject: [Bug libgomp/33720] A negative value in OpenMP clause num_threads is not detected at runtime
- References: <bug-33720-13968@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jakub at gcc dot gnu dot org 2007-11-12 19:37 -------
I'm not sure we should do anything about this.
We have a warning if the compiler can detect non-positive value at compile
time,
but we certainly can't ever issue any diagnostic at runtime for num_threads
0 (because the implementation uses that value to mean no num_threads clause was
present) and I'm not convinced the runtime library needs to be verbose to
stderr. So e.g. silently assuming just one thread is IMHO better than doing
gomp_fatal in there. You shouldn't expect any particular behavior from program
which triggers undefined behavior.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33720