bugTiny C Compiler - Bugs: bug #64939, tcc assertion failed at compile...

 
 

bug #64939: tcc assertion failed at compile time

Submitter:  Junwei Zeng <jwzeng>
Submitted:  Wed 29 Nov 2023 03:18:52 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 16 Dec 2023 02:57:10 PM UTC, comment #3: 

Hi,

The bug seems to have been fixed on tcc-trunk.

I was testing on `tcc version 0.9.27 (x86_64 Linux)` before, and then the previous assertion error occurred.

Later, I tested it on `tcc version 0.9.28rc 2023-09-17 mob@3d128041 (x86_64 Linux)`, and it seemed that there was no such assertion error.

Thank you very much for your previous reply. If you confirm that the bug is no longer triggered, you can close the issue.

Best regards,
Junwei Zeng.

Junwei Zeng <jwzeng>
Sat 16 Dec 2023 05:06:17 AM UTC, comment #2: 

Hi,

The following code can already reproduce the assertion error.

```c
union a b = {};
union a c() {
  return b
```

Here is another complete code example that also reproduces this assertion error. The code is following:

```c
struct a {
} static b;
struct a j() {
  struct a ab[1];
  return ab[0];
}
int main() { return 0; }
```

Hope the above information is useful.

Best regards,
Junwei Zeng.

Junwei Zeng <jwzeng>
Thu 14 Dec 2023 08:02:46 PM UTC, comment #1: 


original submission:

> Hi,
>
> The following code has an assertion failure when compiled with tcc.
>
> ```c
> union a b = {};
> union a c() {
>   return b
> ```
>
> The error message is as follows:
>
> ```
> tcc: ./../x86_64-gen.c:437: load: Assertion `((ft & VT_BTYPE) == VT_INT) || ((ft & VT_BTYPE) == VT_LLONG) || ((ft & VT_BTYPE) == VT_PTR) || ((ft & VT_BTYPE) == VT_FUNC)' failed.
> ```
>
> Hope the above information is useful.


Your mentioned code snippet does not compile.

Please provide a more complete source,
which is able to reproduces the assertion.
Thanks

--
Regards ... Detlef

Detlef Riekenberg <wine_dev>
Wed 29 Nov 2023 03:18:52 AM UTC, original submission:  

Hi,

The following code has an assertion failure when compiled with tcc.

```c
union a b = {};
union a c() {
  return b
```

The error message is as follows:

```
tcc: ./../x86_64-gen.c:437: load: Assertion `((ft & VT_BTYPE) == VT_INT) || ((ft & VT_BTYPE) == VT_LLONG) || ((ft & VT_BTYPE) == VT_PTR) || ((ft & VT_BTYPE) == VT_FUNC)' failed.
```

Hope the above information is useful.

Best regards,
Junwei Zeng.

Junwei Zeng <jwzeng>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wine_dev (Posted a comment)
  • -email is unavailable- added by jwzeng (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-081f.
    Corresponding source code