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:1082: ### Find_parm_type cannot find _temp_vararg1 #35

Open
zqb-all opened this issue Oct 28, 2023 · 0 comments

Comments

@zqb-all
Copy link

zqb-all commented Oct 28, 2023

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

void
Die(char *format, ...)
{
  va_list  argp;
				/* format the error mesg */
  fprintf(stderr, "\nFATAL: ");
  va_start(argp, format);
  vfprintf(stderr, format, argp);
  va_end(argp);
  fprintf(stderr, "\n");
  fflush(stderr);
				/* exit  */
  exit(1);
}

error:

2023-10-28 11:11:33,263 - xcalcc - ERROR - !!! Log: (null) :Translating Die(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1082:
### Find_parm_type cannot find _temp_vararg1
### For a.O in Die (xcalcc:583)
@zqb-all zqb-all changed the title [SPEC2006] [SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1082: ### Find_parm_type cannot find _temp_vararg1 Oct 28, 2023
zengdage added a commit to zengdage/open64 that referenced this issue Jan 4, 2024
The offset is the distance between the field of struct and the start of struct,
but the parameter just be pushed one time if the parameter just hold one register.
So we need to align down the offset of field to register size.

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)
{
  int i, j;
  for(i=0; i<m.rows; i++)
  {
    for(j=0; j<m.cols; j++) {
        printf("%d\n", 1);
    }
  }
}
```

2. Error Log:
```
Find_parm_type cannot find
```

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
None yet
Projects
None yet
Development

No branches or pull requests

1 participant