Frama-C Bug Tracking System - Frama-C
View Issue Details
0002396Frama-CPlug-in > clangpublic2018-08-24 00:252018-08-24 00:25
abhishek.anand.iitg@gmail.com 
virgile 
normalminoralways
assignedopen 
manjaro8/23/3018
Frama-C 17-Chlorine 
 
0002396: cast error with reference fields
class B { }; template class A { public: T &x; A(T &y): x(y) {} }; int main() { B b; B & y=b; A a(y); } I get the following error: root@27db7a69b96a:/hostshare# frama-c -print refFieldBug.cpp [kernel] Parsing refFieldBug.cpp (external front-end) Now output intermediate result [kernel] refFieldBug.cpp:8: Failure: castTo struct _Z1B -> struct _Z1B * [kernel] User Error: stopping on file "refFieldBug.cpp" that has errors. [kernel] Frama-C aborted: invalid user inp I don't see what could be the problem because the following succeeds: class A { public: T &x; A(T &y): x(y) {} }; int main() { int x=0; int & y=x; A a(y); }
No tags attached.
Issue History
2018-08-24 00:25abhishek.anand.iitg@gmail.comNew Issue
2018-08-24 00:25abhishek.anand.iitg@gmail.comStatusnew => assigned
2018-08-24 00:25abhishek.anand.iitg@gmail.comAssigned To => virgile

There are no notes attached to this issue.