From 6856fbc0f1c3f4e96294914450ca0e0ce0a04ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 18 Aug 2018 09:25:45 +0200 Subject: [PATCH] test() --- .gitignore | 1 + NAMESPACE | 2 ++ R/RcppExports.R | 9 +++++++++ RcppNoInitTest.so.bcheck | 32 ++++++++++++++++++++++++++++++++ src/RcppExports.cpp | 27 +++++++++++++++++++++++++++ src/test.cpp | 11 +++++++++++ 6 files changed, 82 insertions(+) create mode 100644 R/RcppExports.R create mode 100644 RcppNoInitTest.so.bcheck create mode 100644 src/RcppExports.cpp create mode 100644 src/test.cpp diff --git a/.gitignore b/.gitignore index 5b6a065..3ec09e2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .Rhistory .RData .Ruserdata +*.bc diff --git a/NAMESPACE b/NAMESPACE index 6ae9268..ea40a18 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,2 +1,4 @@ # Generated by roxygen2: do not edit by hand +importFrom(Rcpp,compileAttributes) +useDynLib(RcppNoInitTest, .registration = TRUE) diff --git a/R/RcppExports.R b/R/RcppExports.R new file mode 100644 index 0000000..75adcf6 --- /dev/null +++ b/R/RcppExports.R @@ -0,0 +1,9 @@ +# Generated by using Rcpp::compileAttributes() -> do not edit by hand +# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +#' @importFrom Rcpp compileAttributes +#' @useDynLib RcppNoInitTest, .registration = TRUE +test <- function() { + .Call(`_RcppNoInitTest_test`) +} + diff --git a/RcppNoInitTest.so.bcheck b/RcppNoInitTest.so.bcheck new file mode 100644 index 0000000..9cfb70d --- /dev/null +++ b/RcppNoInitTest.so.bcheck @@ -0,0 +1,32 @@ + +Function Rcpp::Rcpp_eval(SEXPREC*, SEXPREC*) + [UP] unprotected variable identity while calling allocating function Rf_install /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h:85 + [UP] unprotected variable identity while calling allocating function Rf_lang3(S:evalq,?,?) /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h:85 + [UP] unprotected variable identity while calling allocating function Rf_install /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h:88 + +Function Rcpp::Rcpp_protect(SEXPREC*) + [PB] has possible protection stack imbalance /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shield.h:25 + +Function Rcpp::Shelter::operator()(SEXPREC*) + [PB] has possible protection stack imbalance /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shelter.h:30 + +Function Rcpp::Shelter::~Shelter() + [PB] has an unsupported form of unprotect (not constant, not variable), results will be incomplete /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shelter.h:34 + [UP] unsupported form of unprotect, unprotecting all variables, results will be incomplete /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shelter.h:34 + +Function Rcpp::Shield::~Shield() + [PB] has negative depth /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shield.h:33 + [UP] attempt to unprotect more items (1) than protected (0), results will be incomplete /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shield.h:33 + [PB] has possible protection stack imbalance /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/protection/Shield.h:34 + +Function Rcpp::internal::is_Rcpp_eval_call(SEXPREC*) + [UP] unprotected variable identity_fun while calling allocating function Rf_install /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/exceptions.h:247 + [UP] unprotected variable identity_fun while calling allocating function Rf_install /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/exceptions.h:248 + +Function _RcppNoInitTest_test + [UP] ignoring variable as it has address taken, results will be incomplete + [PB] has possible protection stack imbalance /home/kirill/git/R/RcppNoInitTest/src/RcppExports.cpp:17 + +Function _ZNK4Rcpp14no_init_vectorcvNS_6VectorIXT_ET0_EEILi13ENS_15PreserveStorageEEEv + [UP] calling allocating function Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector(SEXPREC*)(?,V) with argument allocated using Rf_allocVector /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/vector/no_init.h:40 +Analyzed 171 functions, traversed 1013 states. diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp new file mode 100644 index 0000000..16426f7 --- /dev/null +++ b/src/RcppExports.cpp @@ -0,0 +1,27 @@ +// Generated by using Rcpp::compileAttributes() -> do not edit by hand +// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +#include + +using namespace Rcpp; + +// test +IntegerVector test(); +RcppExport SEXP _RcppNoInitTest_test() { +BEGIN_RCPP + Rcpp::RObject rcpp_result_gen; + Rcpp::RNGScope rcpp_rngScope_gen; + rcpp_result_gen = Rcpp::wrap(test()); + return rcpp_result_gen; +END_RCPP +} + +static const R_CallMethodDef CallEntries[] = { + {"_RcppNoInitTest_test", (DL_FUNC) &_RcppNoInitTest_test, 0}, + {NULL, NULL, 0} +}; + +RcppExport void R_init_RcppNoInitTest(DllInfo *dll) { + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); +} diff --git a/src/test.cpp b/src/test.cpp new file mode 100644 index 0000000..cc9f499 --- /dev/null +++ b/src/test.cpp @@ -0,0 +1,11 @@ +#include + +using namespace Rcpp; + +//' @importFrom Rcpp compileAttributes +//' @useDynLib RcppNoInitTest, .registration = TRUE +// [[Rcpp::export]] +IntegerVector test() { + IntegerVector ret = no_init(1); + return ret; +}