Custom Query (145 matches)
Results (40 - 42 of 145)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#53 | fixed | Tuple costs are incorrect | ||
Description |
Tuple costs are not computed correctly. For example: [long, long] f() { return [0, -1]; } The difference between the two alternatives being that 1 is converted to signed int or to signed long, and both expressions are given the same cost. test.c:34:1 error: Cannot choose between 2 alternatives for expression Applying untyped: Name: ?{} ...to: Cast of: Variable Expression: _retval_f: tuple of types signed long int signed long int ... to: reference to tuple of types signed long int signed long int Untyped Tuple: constant expression (0 0: zero_t) Applying untyped: Name: -? ...to: constant expression (1 1: one_t) Alternatives are: Cost ( 0, 0, 0, 0 ): Tuple Assignment Expression, with stmt expr: Statement Expression: CompoundStmt Declaration of __multassign_L6: reference to lvalue signed long int with initializer (not constructed) Simple Initializer: Cast of: Tuple Index Expression, with tuple: Variable Expression: _retval_f: tuple of types signed long int signed long int with index: 0 ... to: reference to lvalue signed long int Declaration of __multassign_L7: reference to lvalue signed long int with initializer (not constructed) Simple Initializer: Cast of: Tuple Index Expression, with tuple: Variable Expression: _retval_f: tuple of types signed long int signed long int with index: 1 ... to: reference to lvalue signed long int Declaration of __multassign_R6: zero_t with initializer (maybe constructed) Constructor initializer: ... initially constructed with Implicit Ctor Dtor Statement ... with Ctor/Dtor: Expression Statement: Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to zero_t intrinsic zero_t ... returning nothing ... to arguments Cast of: Variable Expression: __multassign_R6: zero_t ... to: reference to zero_t constant expression (0 0: zero_t) Declaration of __multassign_R7: signed int with initializer (maybe constructed) Constructor initializer: ... initially constructed with Implicit Ctor Dtor Statement ... with Ctor/Dtor: Expression Statement: Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to signed int intrinsic signed int ... returning nothing ... to arguments Cast of: Variable Expression: __multassign_R7: signed int ... to: reference to signed int Application of Variable Expression: -?: function ... with parameters intrinsic signed int ... returning _retval__operator_unaryminus: signed int ... with attributes: Attribute with name: unused ... to arguments Cast of: constant expression (1 1: one_t) ... to: signed int Expression Statement: Tuple: Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to signed long int intrinsic signed long int ... returning nothing ... to arguments Variable Expression: __multassign_L6: reference to lvalue signed long int Cast of: Variable Expression: __multassign_R6: zero_t ... to: signed long int Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to signed long int intrinsic signed long int ... returning nothing ... to arguments Variable Expression: __multassign_L7: reference to lvalue signed long int Cast of: Variable Expression: __multassign_R7: signed int ... to: signed long int (types: void ) Environment: Cost ( 0, 0, 0, 0 ): Tuple Assignment Expression, with stmt expr: Statement Expression: CompoundStmt Declaration of __multassign_L4: reference to lvalue signed long int with initializer (not constructed) Simple Initializer: Cast of: Tuple Index Expression, with tuple: Variable Expression: _retval_f: tuple of types signed long int signed long int with index: 0 ... to: reference to lvalue signed long int Declaration of __multassign_L5: reference to lvalue signed long int with initializer (not constructed) Simple Initializer: Cast of: Tuple Index Expression, with tuple: Variable Expression: _retval_f: tuple of types signed long int signed long int with index: 1 ... to: reference to lvalue signed long int Declaration of __multassign_R4: zero_t with initializer (maybe constructed) Constructor initializer: ... initially constructed with Implicit Ctor Dtor Statement ... with Ctor/Dtor: Expression Statement: Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to zero_t intrinsic zero_t ... returning nothing ... to arguments Cast of: Variable Expression: __multassign_R4: zero_t ... to: reference to zero_t constant expression (0 0: zero_t) Declaration of __multassign_R5: signed long int with initializer (maybe constructed) Constructor initializer: ... initially constructed with Implicit Ctor Dtor Statement ... with Ctor/Dtor: Expression Statement: Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to signed long int intrinsic signed long int ... returning nothing ... to arguments Cast of: Variable Expression: __multassign_R5: signed long int ... to: reference to signed long int Application of Variable Expression: -?: function ... with parameters intrinsic signed long int ... returning _retval__operator_unaryminus: signed long int ... with attributes: Attribute with name: unused ... to arguments Cast of: constant expression (1 1: one_t) ... to: signed long int Expression Statement: Tuple: Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to signed long int intrinsic signed long int ... returning nothing ... to arguments Variable Expression: __multassign_L4: reference to lvalue signed long int Cast of: Variable Expression: __multassign_R4: zero_t ... to: signed long int Application of Variable Expression: ?{}: function ... with parameters intrinsic reference to signed long int intrinsic signed long int ... returning nothing ... to arguments Variable Expression: __multassign_L5: reference to lvalue signed long int Variable Expression: __multassign_R5: signed long int (types: void ) Environment: |
|||
#54 | fixed | return not detected | ||
Description |
#struct node { node * next; }; static inline node *& get_next( node & this ) { return node.next; } generates error : test.c:5:1 error: Non-void function returns no values: Return Statement, returning: |
|||
#55 | fixed | intrusive stack crash | ||
Description |
This code crashes the compiler : #define NULL (void*)0 trait is_node(dtype T) { T*& get_next( T& ); }; forall(dtype T | is_node(T)) struct __stack { T * top; }; forall(dtype T | is_node(T)) void ?{}( __stack(T) & this ) { this.top = NULL; } forall(dtype T | is_node(T) | sized(T)) void push( __stack(T) & this, T * val ) { get_next( *val ) = this.top; this.top = val; } forall(dtype T | is_node(T) | sized(T)) T * pop( __stack(T) & this ) { T * top = this.top; if( top ) { this.top = get_next( *top ); get_next( *top ) = NULL; } return top; } struct node; static inline node *& get_next( node & this ); __stack(node) n; struct node { node * next; }; static inline node *& get_next( node & this ) { return this.next; } |
Note: See TracQuery
for help on using queries.