[PATCH] D20985: [CUDA] Add implicit conversion of __launch_bounds__ arguments to rvalue.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 3 13:58:39 PDT 2016


jlebar added a comment.

In http://reviews.llvm.org/D20985#448836, @tra wrote:

> In http://reviews.llvm.org/D20985#448822, @jlebar wrote:
>
> > How is this different from test/SemaCUDA/launch_bounds.cu:27-28?  It does
> >
> >   const int constint = 512;
> >   __launch_bounds__(constint) void TestConstInt(void);
> >   
> >
> > which looks verbatim the same as this testcase.
>
>
> Existing test is a declaration of the function which did not trigger the crash.
>  Second issue is that -verify interferes with reproduction case -- the crash does not happen if any //expect-* are seen before it.
>  Plus, the outcome of the failing test is a crash which would prevent reports of other failures.
>  Separate test file makes the crash isolated and reliably reproducible.


Got it, thanks.

Should we have a test that passes a char or a short and ensures that we do the correct implicit conversion there?


================
Comment at: lib/Sema/SemaDeclAttr.cpp:4045
@@ -4043,4 +4044,3 @@
 // May output an error.
-static bool checkLaunchBoundsArgument(Sema &S, Expr *E,
-                                      const CUDALaunchBoundsAttr &Attr,
-                                      const unsigned Idx) {
+static Expr *checkLaunchBoundsArgument(Sema &S, Expr *E,
+                                       const CUDALaunchBoundsAttr &Attr,
----------------
Should we update this name and comment?


http://reviews.llvm.org/D20985





More information about the cfe-commits mailing list