~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to src/compiler/glsl/tests/warnings/029-fieldselection.vert

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#version 130
2
 
 
3
 
struct s {
4
 
  float c;
5
 
  float x;
6
 
};
7
 
 
8
 
void main()
9
 
{
10
 
  float fooFloat;
11
 
  s fooStruct;
12
 
 
13
 
  fooFloat = fooStruct.c;
14
 
  fooStruct.c = 10.0;
15
 
  fooFloat = fooStruct.c;
16
 
  fooStruct.c = 20.0;
17
 
 
18
 
  /* Technically .x is also uninitialized, but detecting this is beyond
19
 
   * scope. FWIW, gcc doesn't detect this neither.
20
 
   */
21
 
  fooFloat = fooStruct.x;
22
 
}
23