Merge pull request #786 from Forty-Bot/ivlpp_segfault_fix
ivlpp: Fix segfault in macro_start_args
This commit is contained in:
commit
74c52d6fa1
|
|
@ -1485,8 +1485,10 @@ static void macro_start_args(void)
|
||||||
* entry for arg 0. This will be used by macro_finish_arg() to
|
* entry for arg 0. This will be used by macro_finish_arg() to
|
||||||
* calculate the buffer location for arg 1.
|
* calculate the buffer location for arg 1.
|
||||||
*/
|
*/
|
||||||
def_buf_free = def_buf_size - 1;
|
if (def_buf) {
|
||||||
def_buf[0] = 0;
|
def_buf_free = def_buf_size - 1;
|
||||||
|
def_buf[0] = 0;
|
||||||
|
}
|
||||||
def_argo[0] = 0;
|
def_argo[0] = 0;
|
||||||
def_argl[0] = 0;
|
def_argl[0] = 0;
|
||||||
def_argc = 1;
|
def_argc = 1;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
`ifndef FOO
|
||||||
|
`define FOO
|
||||||
|
`define BAR(x)
|
||||||
|
`endif
|
||||||
|
|
||||||
|
module macro_args();
|
||||||
|
macro_args_sub sub();
|
||||||
|
endmodule
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
module macro_args_sub();
|
||||||
|
`BAR(0)
|
||||||
|
endmodule
|
||||||
|
|
@ -628,6 +628,7 @@ lh_varindx5 normal ivltests
|
||||||
localparam_type normal ivltests gold=parameter_type.gold
|
localparam_type normal ivltests gold=parameter_type.gold
|
||||||
long_div normal ivltests gold=long_div.gold
|
long_div normal ivltests gold=long_div.gold
|
||||||
macro2 normal ivltests
|
macro2 normal ivltests
|
||||||
|
macro_args CO,-yivltests ivltests
|
||||||
macro_redefinition normal,-Wmacro-redefinition ivltests gold=macro_redefinition.gold
|
macro_redefinition normal,-Wmacro-redefinition ivltests gold=macro_redefinition.gold
|
||||||
macro_replacement normal,-Wmacro-replacement ivltests gold=macro_replacement.gold
|
macro_replacement normal,-Wmacro-replacement ivltests gold=macro_replacement.gold
|
||||||
macsub normal ivltests
|
macsub normal ivltests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue