Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1530: ### Get_arg_by_name: get argument m failed #41

Open
zqb-all opened this issue Oct 28, 2023 · 0 comments
Labels
bug w2ll WHIRL to LLVM

Comments

@zqb-all
Copy link

zqb-all commented Oct 28, 2023

spec2k6 462.libquantum build fail.
one of the errors can be reproduce by the following code:

struct x_struct {
  int y;
  int z;
};

typedef struct x_struct x;

void foo(x m)
{
  printf("%d\n", m.y);
}

cmd

xcalcc -c a.c

error

2023-10-28 16:04:34,571 - xcalcc - ERROR - !!! Log: (null) :Translating foo(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1530:
### Get_arg_by_name: get argument m failed
### For a.O in foo (xcalcc:583)
@Yvan-xy Yvan-xy added bug w2ll WHIRL to LLVM labels Nov 1, 2023
zengdage added a commit to zengdage/open64 that referenced this issue Jan 4, 2024
Actually, the argument name are added a sequence number in Syn_name_w_modifier.
In this case, the real llvm argument name is 'm%0; rather than 'm'.

1. The w2ll will crash if compile the code like that:
```
typedef struct quantum_matrix_struct {
  int rows;
  int cols;
} quantum_matrix;

void quantum_print_matrix(quantum_matrix m)
{
  printf("m.rows;%d\n", m.rows);
}
```

2. Error Log:
```
Get_arg_by_name: get argument m failed
```

Signed-off-by: Zhijin Zeng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug w2ll WHIRL to LLVM
Projects
None yet
Development

No branches or pull requests

2 participants