octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #39041] concatenation of cell array and scalar


From: Rik
Subject: [Octave-bug-tracker] [bug #39041] concatenation of cell array and scalar struct
Date: Mon, 22 May 2017 12:20:59 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

Follow-up Comment #5, bug #39041 (project octave):

I was able to obtain a backtrace for 


[ {}, struct() ]




#0  octave_base_value::cell_value (this=0x14d35a0) at
libinterp/octave-value/ov-base.cc:549
#1  0x00007f254e16dd6d in octave_value::cell_value
(address@hidden)
    at libinterp/octave-value/ov.cc:1649
#2  0x00007f254e230ea9 in octave_value_extract<Cell> (v=...) at
libinterp/corefcn/Cell.h:147
#3  octave::single_type_concat<Cell, octave_value> (result=..., dv=...,
tmp=...)
    at libinterp/parse-tree/pt-tm-const.h:331
#4  0x00007f254e22cf13 in octave::do_single_type_concat<Cell> (tmp=...,
dv=...)
    at libinterp/parse-tree/pt-tm-const.h:424
#5  octave::tree_evaluator::visit_matrix (this=0x12f2720, expr=...)
    at libinterp/parse-tree/pt-eval.cc:1371
#6  0x00007f254e2436fa in octave::tree_matrix::accept (this=<optimized out>,
tw=...)
    at libinterp/parse-tree/pt-mat.h:74
#7  0x00007f254e0b52d2 in octave::tree_evaluator::evaluate
(address@hidden, 
    address@hidden, nargout=<optimized out>, address@hidden)
    at libinterp/parse-tree/pt-eval.h:254
#8  0x00007f254e2240a5 in octave::tree_evaluator::visit_statement
(this=0x12f2720, stmt=...)
    at libinterp/parse-tree/pt-eval.cc:2000
#9  0x00007f254e24c4f0 in octave::tree_statement::accept (this=<optimized
out>, tw=...)
    at libinterp/parse-tree/pt-stmt.h:115
#10 0x00007f254e21ef4c in octave::tree_evaluator::visit_statement_list
(this=0x12f2720, lst=...)
    at libinterp/parse-tree/pt-eval.cc:2042
#11 0x00007f254e5a064c in octave::tree_statement_list::accept (tw=...,
this=<optimized out>)
    at libinterp/parse-tree/pt-stmt.h:193
#12 octave::interpreter::main_loop (address@hidden)
    at libinterp/corefcn/interpreter.cc:946
#13 0x00007f254e5a7393 in octave::interpreter::execute (this=0x12f29d0)
    at libinterp/corefcn/interpreter.cc:670
#14 0x00007f254dc950ad in octave::application::execute_interpreter
(this=<optimized out>)
    at libinterp/octave.cc:394
#15 0x00007f254dc94ca8 in octave::cli_application::execute
(address@hidden)
    at libinterp/octave.cc:446
#16 0x0000000000401213 in main (argc=8, argv=0x7fff350696f8) at
src/main-cli.cc:90


As expected, Octave gets it right that the return type for this should be a
cell array.  It calls do_single_type_concat<Cell> correctly.  The probablem
seems to be that the struct is held as an octave_value.  When the code tries
to get the underlying object using octave_value_extract<Cell> this results in
calling the method cell_value() on the octave_value object.  But I don't see
an overload in ov-struct.h for the cell_value routine.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39041>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]