Bug 88806 - nir/nir_constant_expressions.c:2754:15: error: controlling expression type 'unsigned int' not compatible with any generic association type
Summary: nir/nir_constant_expressions.c:2754:15: error: controlling expression type 'u...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) FreeBSD
: medium blocker
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2015-01-26 18:08 UTC by Vinson Lee
Modified: 2016-07-09 00:10 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2015-01-26 18:08:32 UTC
mesa: 9cbb9165b9454ccc7f2a6702ce71bc5cd9faba02 (master 10.5.0-devel)

  CC       nir/nir_constant_expressions.lo
nir/nir_constant_expressions.c:2754:15: error: controlling expression type 'unsigned int' not compatible with any generic association type
if (!isnormal(dst))
              ^~~
/usr/include/math.h:119:38: note: expanded from macro 'isnormal'
#define isnormal(x) __fp_type_select(x, __isnormalf, __isnormal, __isnormall)
                                     ^
/usr/include/math.h:86:49: note: expanded from macro '__fp_type_select'
#define __fp_type_select(x, f, d, ld) _Generic((x),                     \
                                                ^
Comment 1 Vinson Lee 2015-01-26 19:44:51 UTC
89285e4d47a65e52547180dca46ecfd81b2996e9 is the first bad commit
commit 89285e4d47a65e52547180dca46ecfd81b2996e9
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Fri Jan 23 13:38:46 2015 -0800

    nir: add new constant folding infrastructure
    
    Add a required field to the Opcode class, const_expr, that contains an
    expression or statement that computes the result of the opcode given known
    constant inputs. Then take those const_expr's and expand them into a function
    that takes an opcode and an array of constant inputs and spits out the constant
    result. This means that when adding opcodes, there's one less place to update,
    and almost all the opcodes are self-documenting since the information on how to
    compute the result is right next to the definition.
    
    The helper functions in nir_constant_expressions.c were taken from
    ir_constant_expressions.cpp.
    
    v3 Jason Ekstrand <jason.ekstrand@iastate.edu>
     - Use mako to generate one function per opcode instead of doing piles of
       string splicing
    
    v4 Jason Ekstrand <jason.ekstrand@iastate.edu>
     - More comments and better indentation in the mako
     - Add a description of the constant expression language in nir_opcodes.py
     - Added nir_constant_expressions.py to EXTRA_DIST in Makefile.am
    
    Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
    Reviewed-by: Connor Abbott <cwabbott0@gmail.com>

:040000 040000 4823f33d8c6840f25c1aefc6c61cec212492c805 5d152f618ce5fe346a0e71f4be242b597120a219 M	src
bisect run success
Comment 2 Jason Ekstrand 2015-01-26 22:22:52 UTC
I just sent two patches to the list that should fix this.
Comment 3 Jason Ekstrand 2015-01-27 00:03:46 UTC
Could you please try this branch and see if it works:

http://cgit.freedesktop.org/~jekstrand/mesa/log/?h=fpclassify
Comment 4 Jason Ekstrand 2015-01-28 11:49:46 UTC
This should be fixed in master.  Reopen if it's not.
Comment 5 Vinson Lee 2015-01-28 20:19:02 UTC
mesa: 58e8468d113c7d3d4a59ea4a8d70fd45b78e85e6 (10.5.0-devel)

  CC       nir/nir_constant_expressions.lo
nir/nir_constant_expressions.c:2754:16: error: controlling expression type 'unsigned int' not compatible with any
      generic association type
if (fpclassify(dst) != FP_NORMAL)
               ^~~
/usr/include/math.h:114:19: note: expanded from macro 'fpclassify'
        __fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyl)
                         ^
/usr/include/math.h:86:49: note: expanded from macro '__fp_type_select'
#define __fp_type_select(x, f, d, ld) _Generic((x),                     \
                                                ^
Comment 6 Jason Ekstrand 2015-03-14 16:30:24 UTC
What's the status of this bug.  I thought it'd been fixed.
Comment 7 Vinson Lee 2015-03-17 06:33:55 UTC
mesa: 627c68308683abbd6e563a09af6013a33938a790 (master 10.6.0-devel)

The build error doesn't occur anymore.
Comment 8 Jason Ekstrand 2015-03-17 14:04:21 UTC
Then let's close this


bug/show.html.tmpl processed on Mar 27, 2017 at 20:26:36.
(provided by the Example extension).