Summary: | nir_opt_copy_prop_vars.c:454: error: unknown field ‘ssa’ specified in initializer | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | caio.oliveira |
Version: | git | Keywords: | bisected, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2019-03-02 06:53:15 UTC
I suspect this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676. In our struct we have a nested union that's unnamed. The tested GCC misses that somehow. struct value { bool is_ssa; union { struct { nir_ssa_def *def[NIR_MAX_VEC_COMPONENTS]; uint8_t component[NIR_MAX_VEC_COMPONENTS]; } ssa; nir_deref_instr *deref; }; }; The bug comments there suggests (1) adding extra set of braces around the .ssa in the initializer. Other possible ways to fix are: (2) naming the union, or (3) creating the temporary and then assigning to '*value' in the code. If we have to do this, I think the more natural solution would be (3). I don't have GCC 4.4 handy to test those three options though. commit 77aa11ca325112c8d1727f7bb7c2035500c72c1a Author: Vinson Lee <vlee@freedesktop.org> Date: Thu Mar 21 14:47:06 2019 -0700 nir: Fix anonymous union initialization with older GCC. Fix this build error with GCC 4.4.7. CC nir/nir_opt_copy_prop_vars.lo nir/nir_opt_copy_prop_vars.c: In function ‘load_element_from_ssa_entry_value’: nir/nir_opt_copy_prop_vars.c:454: error: unknown field ‘ssa’ specified in initializer nir/nir_opt_copy_prop_vars.c:455: error: unknown field ‘def’ specified in initializer nir/nir_opt_copy_prop_vars.c:456: error: unknown field ‘component’ specified in initializer nir/nir_opt_copy_prop_vars.c:456: error: extra brace group at end of initializer nir/nir_opt_copy_prop_vars.c:456: error: (near initialization for ‘(anonymous).<anonymous>’) nir/nir_opt_copy_prop_vars.c:456: warning: excess elements in union initializer nir/nir_opt_copy_prop_vars.c:456: warning: (near initialization for ‘(anonymous).<anonymous>’) Fixes: 96c32d77763c ("nir/copy_prop_vars: handle load/store of vector elements") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109810 Reviewed-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.