| Priority | medium |
|---|---|
| Bug ID | 80266 |
| Assignee | nouveau@lists.freedesktop.org |
| Summary | Undefined operation in tgsi_ureg.c left shift of 1 by 31 places cannot be represented in type 'int' |
| Severity | minor |
| Classification | Unclassified |
| OS | Linux (All) |
| Reporter | zeccav@gmail.com |
| Hardware | x86-64 (AMD64) |
| Status | NEW |
| Version | 10.2 |
| Component | Drivers/DRI/nouveau |
| Product | Mesa |
In tgsi_ureg.c:1498
"if (ureg->vs_inputs[i/32] & (1 << (i%32))) {"
when i==31 then 1 << 31 may be computed.
With gcc option -std=c99 this is wrong because the result cannot be int.
Perhaps the right instruction is
"if (ureg->vs_inputs[i/32] & ((unsigned) 1 << (i%32))) {"