Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002396Frama-CPlug-in > clangpublic2018-08-24 00:252018-08-24 00:25
Reporterabhishek.anand.iitg@gmail.com 
Assigned Tovirgile 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSmanjaroOS Version8/23/3018
Product VersionFrama-C 17-Chlorine 
Target VersionFixed in Version 
Summary0002396: cast error with reference fields
Descriptionclass B {
};

template <typename T>
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<int> a(y);
}
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-08-24 00:25 abhishek.anand.iitg@gmail.com New Issue
2018-08-24 00:25 abhishek.anand.iitg@gmail.com Status new => assigned
2018-08-24 00:25 abhishek.anand.iitg@gmail.com Assigned To => virgile


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker